Rectangle class.
Rectangle class. Each instance of this class represents a rectangle whose sides are parallel to the axis. Such a rectangle represents all the points whose coordinates lies between well defined minimal and maximal values. Member functions can combine several rectangles by computing the intersection of rectangles (intersect) or the smallest rectangle enclosing two rectangles (recthull).
GRect(int xmin, int ymin, unsigned int width=0, unsigned int height=0)
int width() const
int height() const
int area() const
int isempty() const
int contains(int x, int y) const
int contains(const GRect & rect) const
friend int operator==(const GRect & r1, const GRect & r2)
friend int operator!=(const GRect & r1, const GRect & r2)
void clear()
int inflate(int dx, int dy)
int translate(int dx, int dy)
int intersect(const GRect &rect1, const GRect &rect2)
int recthull(const GRect &rect1, const GRect &rect2)
void scale(float factor)
void scale(float xfactor, float yfactor)
int xmin
int ymin
int xmax
int ymax
Alphabetic index HTML hierarchy of classes or Java