|
| | Rect () |
| | create empty rectangle with coordinates set to zero More...
|
| |
| | Rect (UCoord left, UCoord top, UCoord right, UCoord bottom) |
| | create rectangle with four individual coordinates More...
|
| |
| | Rect (UCoord w, UCoord h) |
| | create rectangle with zero left/top coordinates and right/bottom coordinates according to the given width and height More...
|
| |
| | Rect (const Point &topLeft, const Point &bottomRight) |
| | create rectangle defined by a top/left Point and a bottom/right Point More...
|
| |
| | Rect (const Point &topLeft, UCoord width, UCoord height) |
| | create rectangle defined by a top/left Point and the given width and height More...
|
| |
| | Rect (const ViewRect &vr) |
| | create rectangle defined by a ViewRect More...
|
| |
| UCoord | getWidth () const |
| | return width of rectangle (right coordinate - left coordinate) More...
|
| |
| UCoord | getHeight () const |
| | return height of rectangle (bottom coordinate - top coordinate) More...
|
| |
| Rect & | setWidth (const UCoord w) |
| | set width by setting the right coordinate with respect to the left More...
|
| |
| Rect & | setHeight (const UCoord h) |
| | set height by setting the bottom coordinate with respect to the top More...
|
| |
| void | setEmpty () |
| | resets coordinates to all zero - now isEmpty returns true More...
|
| |
| Point | getTopLeft () const |
| | get top/left as Point More...
|
| |
| Point & | getTopLeft (Point &) const |
| | get top/left as Point More...
|
| |
| Point | getBottomRight () const |
| | get bottom/right as Point More...
|
| |
| Point & | getBottomRight (Point &) const |
| | get bottom/right as Point More...
|
| |
| Point | getTopRight () const |
| | get top/right as Point More...
|
| |
| Point & | getTopRight (Point &) const |
| | get top/right as Point More...
|
| |
| Point | getBottomLeft () const |
| | get bottom/left as Point More...
|
| |
| Point & | getBottomLeft (Point &) const |
| | get bottom/left as Point More...
|
| |
| Point & | toPoint (Direction dir, Point &p) const |
| | convert rectangle to a point More...
|
| |
| Point | toPoint (Direction dir) const |
| | convert rectangle to a point More...
|
| |
| Rect & | setTopLeft (const UCoord left, const UCoord top) |
| | set top/left from coordinates More...
|
| |
| Rect & | setBottomRight (const UCoord right, const UCoord bottom) |
| | set bottom/right from coordinates More...
|
| |
| Rect & | setSize (const UCoord w, const UCoord h) |
| | set size by setting bottom/right with respect to left/top More...
|
| |
| Rect & | operator() (UCoord left, UCoord top, UCoord right, UCoord bottom) |
| | set left/top/right/bottom from four individual coordinates More...
|
| |
| Rect & | operator() (const Point &topLeft, const Point &bottomRight) |
| | set left/top/right/bottom from top/left Point and bottom/right Point More...
|
| |
| void | set (UCoord left, UCoord top, UCoord right, UCoord bottom) |
| | return height of rectangle (bottom coordinate - top coordinate) More...
|
| |
| Rect & | moveTo (const Point &where) |
| | move rectangle to a new top/left point while maintaining width and height More...
|
| |
| Rect & | offset (UCoord x, UCoord y=0) |
| | offset rectangle by x/y coordinates maintaining width and height More...
|
| |
| Rect & | offset (const Point &where) |
| | offset rectangle by a x/y Point maintaining width and height More...
|
| |
| Rect & | inset (UCoord delta) |
| | inset top/left and bottom/right by equal amounts to change rectangle size More...
|
| |
| Rect & | inset (UCoord deltaH, UCoord deltaV) |
| | inset left/right by an equal amount similarly, inset top/bottom by an equal amount, to change rectangle size More...
|
| |
| Rect & | inset (UCoord deltaL, UCoord deltaT, UCoord deltaR, UCoord deltaB) |
| | inset left/top/right/bottom each by a separate amount to change the rectangle size More...
|
| |
| Rect & | originize () |
| | move rectangle so the left/top coordinate are zero while maintaining the width and height More...
|
| |
| Rect & | normalize () |
| | flips left/right and top/bottom values if value pairs are such that right<left or bottom<top coordinates More...
|
| |
| Rect & | center (const Rect &rect) |
| | centers this with respect to rect More...
|
| |
| Rect & | centerH (const Rect &rect) |
| | centers this with respect to rect More...
|
| |
| Rect & | centerV (const Rect &rect) |
| | centers this with respect to rect More...
|
| |
| bool | bound (const Rect &rect) |
| | set this to the intersection of this and rect; returns false if intersection is empty More...
|
| |
| bool | slideInside (const Rect &rect) |
| | fit this inside the larger rect. if not possible return false. More...
|
| |
| bool | join (const Rect &rect) |
| | set this to the union of this and rect More...
|
| |
| bool | joinEvenIfEmpty (const Rect &rect) |
| | set this to the union of this and rect and do not skip if both rect areas are 'empty' More...
|
| |
| bool | subtract (const Rect &rect) |
| | trim this by the rect given More...
|
| |
| bool | isEmpty () const |
| |
| bool | rectInside (const Rect &rect) const |
| | checks if rect is enclosed by this More...
|
| |
| bool | rectIntersect (const Rect &rect) const |
| | checks if rect touches this More...
|
| |
| bool | rectIntersect (const Rect &rect, Rect &result) const |
| | checks if rect touches this: if true intersection is in result More...
|
| |
| Point | getCenter () const |
| | get point in the middle of the rect (might not be precise for even sized rects) More...
|
| |
| Point | getLeftCenter () const |
| |
| Point | getRightCenter () const |
| |
| Point | getTopCenter () const |
| |
| Point | getBottomCenter () const |
| |
| bool | overlapHorizontal (const Rect &rect) const |
| | checks if the horizontal coord ranges overlap More...
|
| |
| bool | overlapVertical (const Rect &rect) const |
| | checks if the vertical coord ranges overlap More...
|
| |
| UCoord | getOverlapHorizontal (const Rect &rect) const |
| | get horizontal overlapping area, returns 0 if not overlapping More...
|
| |
| UCoord | getOverlapVertical (const Rect &rect) const |
| | get vertical overlapping area, returns 0 if not overlapping More...
|
| |
| bool | pointInside (const Point &where) const |
| | checks if point is inside this rect More...
|
| |
| Point & | constrain (Point &p) const |
| | constrains the point such that is lies within this rect More...
|
| |
| bool | lineInside (const Point &p1, const Point &p2) const |
| | is line inside rect ? More...
|
| |
| bool | lineIntersect (const Point &p1, const Point &p2) const |
| | is line intersecting rect? More...
|
| |
| bool | boundLine (Point &p1, Point &p2) const |
| | bound line to rect, returns false if line does not intersect rect More...
|
| |
| Rect & | operator+= (const Point &p) |
| | performs a 'offset' operation on this More...
|
| |
| Rect & | operator+= (const Rect &rect) |
| | performs a 'join' operation on this More...
|
| |
| ViewRect & | toViewRect (ViewRect &vr) const |
| | sets the ViewRect coordinates to the current coordinates of this More...
|
| |
| void | fromViewRect (const ViewRect &vr) |
| | sets the current coordinates of this to the ViewRect coordinates More...
|
| |
| Rect & | operator= (const ViewRect &vr) |
| | performs a 'fromViewRect' operation More...
|
| |
| | operator ViewRect () const |
| | conversion operator to ViewRect More...
|
| |