The area class represents a rectangle of pixels.
It is typically used to select certain areas of pixels for operations such as copying, and clearing.
The most important thing to understand about area objects is that zero areas represent zero areas.
This means that an area object Area(0,0,0,0) covers zero pixels, instead of one pixel.
An area Area(0,0,1,1) covers a single pixel, even though the points (0,0) and (1,1) span over a 2x2 block of pixels.
Another way to think about it is that the top-left coordinate is inclusive and the bottom-right coordinate is exclusive.
See Surface::load(), Surface::save(), Surface::copy(), and Surface::clear() for examples of the use of areas.
Default constructor.
left, right, top and bottom are all set to zero.
Creates a rectangular area with the upper left corner at ( left, top ) and the lower right corner at ( right, bottom ).
Switches the left and right coordinates if left > right.
Switches the top and bottom coordinates if top > bottom.
Copy constructor.
Destructor.
Gets the left coordinate of the area.
Gets the top coordinate of the area.
Gets the right coordinate of the area.
Gets the bottom coordinate of the area.
Gets the width of the area ( right - left ).
Gets the height of the area ( bottom - top ).
Assignment operator.
Equality operator.
Inequality operator.