| Ipelib
    | 
#include <ipegeo.h>
| Public Member Functions | |
| Rect () | |
| Rect (const Vector &c) | |
| Rect (const Vector &c1, const Vector &c2) | |
| void | clear () | 
| int | isEmpty () const | 
| double | left () const | 
| double | right () const | 
| double | bottom () const | 
| double | top () const | 
| Vector | topRight () const | 
| Vector | bottomLeft () const | 
| Vector | topLeft () const | 
| Vector | bottomRight () const | 
| double | width () const | 
| double | height () const | 
| void | addPoint (const Vector &rhs) | 
| void | addRect (const Rect &rhs) | 
| void | clipTo (const Rect &rhs) | 
| bool | contains (const Vector &rhs) const | 
| bool | contains (const Rect &rhs) const | 
| bool | certainClearance (const Vector &v, double bound) const | 
| bool | intersects (const Rect &rhs) const | 
| Related Functions | |
| (Note that these are not member functions.) | |
| Stream & | operator<< (Stream &stream, const Rect &rhs) | 
Axis-parallel rectangle (which can be empty)
| 
 | inlineexplicit | 
Create empty rectangle.
| 
 | inlineexplicit | 
Create rectangle containing just the point c.
Create rectangle containing points c1 and c2.
| 
 | inline | 
Make rectangle empty.
| 
 | inline | 
True if rectangle is empty.
| 
 | inline | 
Return left side.
| 
 | inline | 
Return right side.
| 
 | inline | 
Return bottom side.
| 
 | inline | 
Return top side.
| 
 | inline | 
Return top right corner.
| 
 | inline | 
Return bottom left corner.
| 
 | inline | 
Return top left corner.
| 
 | inline | 
Return bottom right corner.
| 
 | inline | 
Return width.
| 
 | inline | 
Return height.
| void Rect::addPoint | ( | const Vector & | rhs | ) | 
Enlarge rectangle to contain point.
| void Rect::addRect | ( | const Rect & | rhs | ) | 
Enlarge rectangle to contain rhs rectangle.
Does nothing if rhs is empty.
| void Rect::clipTo | ( | const Rect & | cbox | ) | 
Clip rectangle to fit inside cbox.
Does nothing if either rectangle is empty.
| bool Rect::contains | ( | const Vector & | rhs | ) | const | 
Does (closed) rectangle contain the point?
| bool Rect::contains | ( | const Rect & | rhs | ) | const | 
Does rectangle contain other rectangle?
| bool Rect::certainClearance | ( | const Vector & | v, | 
| double | bound | ||
| ) | const | 
Returns false if the distance between the box and v is smaller than bound. Often returns true if their distance is larger than bound.
| bool Rect::intersects | ( | const Rect & | rhs | ) | const | 
Does rectangle intersect other rectangle?