#include <rect.h>
Public Member Functions | |
| LRECT2D () | |
| LRECT2D (INT32 xsize, INT32 ysize) | |
| LRECT2D (INT32 xi, INT32 yi, INT32 xl, INT32 yl) | |
| bool | Contains (INT32 x, INT32 y) const |
| bool | Contains (const LPOINT2D &pt) const |
| bool | Contains (const LRECT2D &rhs) const |
| void | Expand (const INT32 value) |
| void | Expand (const INT32 xval, const INT32 yval) |
| void | Extend (const LRECT2D &rect) |
| void | Extend (const LPOINT2D &pt) |
| void | Extend (const INT32 xval, const INT32 yval) |
| INT32 | GetArea () const |
| void | GetBottomLeft (LPOINT2D &ret) const |
| void | GetBottomRight (LPOINT2D &ret) const |
| DPOINT2D | GetCenter () const |
| void | GetCenter (DPOINT2D &ret) const |
| void | GetCorners (LPOINT2D *corners, bool ClosePoly=false, bool OrientCCW=false) const |
| int | GetDimension () const |
| UINT32 | GetHeight () const |
| void | GetSize (LPOINT2D &ret) const |
| void | GetTopLeft (LPOINT2D &ret) const |
| void | GetTopRight (LPOINT2D &ret) const |
| UINT32 | GetWidth () const |
| bool | IniRead (INIHANDLE IniHandle, const char *IniGroup, const char *IniName) |
| void | IniWrite (INIHANDLE IniHandle, const char *IniGroup, const char *IniName) const |
| void | Intersect (const LRECT2D &rect) |
| bool | IsValid () const |
| void | Limit (LPOINT2D &point) const |
| void | Limit (DPOINT2D &point) const |
| bool | Overlaps (const LRECT2D &rhs) const |
| void | Set (INT32 x1, INT32 y1, INT32 x2, INT32 y2) |
| void | SetInvalid () |
| void | SwapBytes () |
| CHECKSIZE (16) | |
Public Attributes | |
| INT32 | xinit |
| INT32 | yinit |
| INT32 | xlast |
| INT32 | ylast |
Definition at line 180 of file rect.h.
|
|
Default constructor, initializes to invalid (empty) rectangle.
|
|
||||||||||||
|
Construct rectangle of specified size.
|
|
||||||||||||||||||||
|
Construction from X/Y ranges.
|
|
|
Make compiler validate structure size.
|
|
|
Check if contains specified rectangle.
|
|
|
Check if contains specified point.
|
|
||||||||||||
|
Check if contains specified point.
|
|
||||||||||||
|
Expand the rectangle by 'value' amount.
|
|
|
Expand the rectangle by 'value' amount.
|
|
||||||||||||
|
Extend rectangle to include specified X,Y point.
|
|
|
Extend rectangle to include specified LPOINT2D point.
|
|
|
Extend rectangle to encompass both rectangles.
|
|
|
Compute area of rectangle (Could be negative if invalid rectangle).
|
|
|
Return bottom left corner.
|
|
|
Get bottom right corner.
|
|
|
Get center point of rectangle.
|
|
|
Return center point of rectangle.
|
|
||||||||||||||||
|
Get corners as array.
|
|
|
Compute number of non zero dimensions (0, 1, or 2).
|
|
|
Return height (Y size) of rectangle.
|
|
|
Get size of rectangle.
|
|
|
Return top left point of rectangle.
|
|
|
Return top right point of rectangle.
|
|
|
Return width (X size) of rectangle.
|
|
||||||||||||||||
|
Read rectangle from INI file.
|
|
||||||||||||||||
|
Read rectangle from INI file.
|
|
|
Intersect two DRECT2D's, may result in an invalid rectangle.
|
|
|
Check if rectangle is valid.
|
|
|
Limit point (DPOINT2D) to extents specified by rectangle.
|
|
|
Limit point (LPOINT2D) to extents specified by rectangle.
|
|
|
Check if rectangle overlaps.
|
|
||||||||||||||||||||
|
Set given (x1,y1), (x2,y2).
|
|
|
Sets the initial values to the maximum possible and the final values to the minimum possible, thus making the rectangle "invalid". Setting a rectangle to invalid means that no point will be in it. It also makes it easy to compute the min/max of a bunch of points. You just iterate through all the points and Extend() the rectangle. Normally, you'd have to handle the first point specially. |
|
|
Perform byte-order swapping.
|
|
|
Minimum X coordinate (inclusive).
|
|
|
Maximum X coordinate (inclusive).
|
|
|
Minimum Y coordinate (inclusive).
|
|
|
Maximum Y coordinate (inclusive).
|
1.3.4-20031026