Geometrical two-dimensional rectangle
The XRect class is the two dimensional representation of a geometrical rectangle with the upper left corner a and the lower left corner b. Methods to assign corners and operators for mathematical calculation are included.
XPoint b
XRect()
XRect(unsigned __xa, unsigned __ya, unsigned __xb, unsigned __yb)
__ya - y coordinate of upper left corner
__xb - x and
__yb - y coordinate of lower right corner XRect(XPoint __a, XPoint __b)
__b - lower right cornervoid Assign(XPoint __a, XPoint __b)
__b - lower right cornervoid Assign(unsigned __xa, unsigned __ya, unsigned __xb, unsigned __yb)
__ya - y coordinate of upper left corner
__xb - x and
__yb - y coordinate of lower right cornervoid Move(XPoint __delta)
void Grow(XPoint __delta)
void Intersect(XRect __r)
bool IsValid()
void Union(XRect __r)
bool Contains(XPoint __p)
XRect& operator = (XRect __r)
bool operator == (XRect __r)
bool operator != (XRect __r)
XRect& operator += (XPoint __delta)
XRect& operator -= (XPoint __delta)