Rect Struct Reference
Describe a rectangular area with coordinates expressed in pixels. More...
#include <gfx.h>
Detailed Description
Describe a rectangular area with coordinates expressed in pixels.
The rectangle is represented in terms of its top/left and right/bottom borders.
In some cases, rectangles are assumed to obey to the following invariants:
xmin <= xmax ymin <= ymax
Oddly, the xmin and ymin coordinates are inclusive, while the xmax and ymax coordinates are non-inclusive. This design decision makes several computations simpler and lets you specify empty (0x0) rectangles without breaking the invariants.
Computing the size of a rectangle can be done by simply subtracting the maximum X or Y coordinate from the minimum X or Y coordinate.
Definition at line 111 of file gfx.h.
The documentation for this struct was generated from the following file:
