|
Public Member Functions |
| | Rect (const double &left, const double &top, const double &right, const double &bottom) |
| | Rect (const Rect &rect) |
| | Rect () |
| double | getLeft () const |
| void | setLeft (const double &left) |
| double | getTop () const |
| void | setTop (const double &top) |
| double | getRight () const |
| void | setRight (const double &right) |
| double | getBottom () const |
| void | setBottom (const double &bottom) |
| double | getWidth () const |
| | the width of the rectangle, or the value returned from abs(right - left)
|
| double | getHeight () const |
| | the height of the rectangle, or the value returned from abs(bottom - top)
|
| void | setRect (const double &left, const double &top, const double &right, const double &bottom) |
| | sets the left, top, right, and bottom all at once
|
| void | setRect (const Rect &rect) |
| void | setRect (const Point &topleft, const Point &bottomright) |
| | sets the left, top, right, and bottom all at once using the two opposite corners
|
| Rect & | getRect (void) |
| | gets a reference to this Rect instance itself.
|
| void | setOrigin (const double &left, const double &top) |
| | changes the origin of a rectangle, i.e.
|
| void | setOrigin (const Point &topleft) |
| void | setSize (const double &width, const double &height) |
| | changes the size of a rectangle, i.e.
|
| void | setWidth (const double &width) |
| void | setHeight (const double &height) |
| void | normalize () |
| | normalizes the rectangles coordinates so that
|
| bool | isNormalized () const |
| | tells if the rect is mormalized, i.e.
|
| bool | isEmpty () const |
| | tells if the rect is mormalized, i.e.
|
| void | setEmpty () |
| bool | isNull () const |
| void | setNull () |
| void | offset (const double &dx, const double &dy) |
| void | offset (const Point &_offsetPt) |
| void | inflate (const double &x, const double &y) |
| | inflates the rectangle
|
| void | inflate (const double &left, const double &top, const double &right, const double &bottom) |
| | inflates the rectangle
|
| void | inflate (const Rect &rect) |
| | inflates the rectangle
|
| void | add (const Rect *rect) |
| void | subtract (const Rect *rect) |
| Rect | makeIntersection (const Rect *rect) |
| | creates the Rect intersection of this instance with another rectangle
|
| Rect | makeUnion (const Rect *rect) |
| | not implemented yet
|
| Point | getTopLeft (void) const |
| Point | getTopRight (void) const |
| Point | getBottomLeft (void) const |
| Point | getBottomRight (void) const |
| Point | getCenter (void) const |
| Point | getCenterLeft (void) const |
| Point | getCenterTop (void) const |
| Point | getCenterRight (void) const |
| Point | getCenterBottom (void) const |
| bool | containsPt (Point *point) const |
| | tells if the point lay within this rectangle's coordinates Any point on the top or on the left border of the rectangle is considered inside the rectangle.
|
| bool | containsPtCloseTo (Point *point, const double &tolerance) const |
| | tells if the point lay within this rectangle's coordinates a given tolerance is admitted in order to consider the point inside the rectangle.
|
| bool | containsPtOpen (Point *point) const |
| | tells if the point lay within this rectangle's coordinates Any point on the border of the rectangle is not considered inside the rectangle.
|
| bool | containsPtClose (Point *point) const |
| | tells if the point lay within this rectangle's coordinates Any point on the border of the rectangle is considered inside the rectangle.
|
| bool | containsRect (Rect *rect) const |
| | tells if the specified rectangle fall inside the bound of this Rect instance.
|
| bool | containsRectOpen (Rect *rect) const |
| | tells if the specified rectangle fall inside the bound of this Rect instance.
|
| bool | containsRectClose (Rect *rect) const |
| | tells if the specified rectangle fall inside the bound of this Rect instance.
|
| Rect & | operator= (const Rect &rect) |
| bool | operator== (const Rect &rectToCompare) const |
| bool | operator!= (const Rect &rectToCompare) const |
| Rect | operator+ () const |
| Rect | operator- () const |
| Rect & | operator+= (const Rect &rc) |
| Rect & | operator-= (const Rect &rc) |
| Rect & | operator *= (const Rect &rc) |
| Rect & | operator/= (const Rect &rc) |
| Rect | operator+ (const Rect &rc) const |
| Rect | operator- (const Rect &rc) const |
| Rect | operator * (const Rect &rc) const |
| Rect | operator/ (const Rect &rc) const |
| Rect & | operator+= (const double d) |
| Rect & | operator-= (const double d) |
| Rect & | operator *= (const double d) |
| Rect & | operator/= (const double d) |
| Rect | operator+ (const double d) const |
| Rect | operator- (const double d) const |
| Rect | operator * (const double d) const |
| Rect | operator/ (const double d) const |
| virtual String | toString () const |
| | returns a String giving the infos about this Rect instance.
|
| virtual void | saveToStream (OutputStream *stream, const MIMEType &type=MIMEType()) |
| | writes the object to the specified output stream
|
| virtual void | loadFromStream (InputStream *stream, const MIMEType &type=MIMEType()) |
| | reads the object from the specified input stream
|
| double | _getLeft () |
| | This is only here because the RTTI functions are not "const safe" - kind of stupid - will fix later.
|
| double | _getTop () |
| double | _getRight () |
| double | _getBottom () |
| double | _getWidth () |
| double | _getHeight () |
Public Attributes |
| double | bottom_ |
| double | right_ |
| double | top_ |
| double | left_ |