Xterminal Home Page | Main page |
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 corner void Assign(XPoint __a, XPoint __b)
__b - lower right corner void 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 corner void Move(int __dx, int __dy)
__dy - and y direction void Grow(int __dx, int __dy)
__dy - growth in y direction void Intersect(XRect __r)
void Union(XRect __r)
int Contains(XPoint __p)
XRect& operator = (XRect __r)
int operator == (XRect __r)
int operator != (XRect __r)