Class encapsulating operations on a Rectangle. More...
Public Member Functions | |
| Point | getPosition () |
| Return top-left postion of Rect as a Point. | |
| float | getWidth () |
| return width of Rect area | |
| float | getHeight () |
| return height of Rect area | |
| Size | getSize () |
| return the size of the Rect area | |
| void | setPosition (Point pt) |
| set the position of the Rect (leaves size in tact) | |
| void | setWidth (float width) |
| set the width of the Rect object | |
| void | setHeight (float height) |
| set the height of the Rect object | |
| void | setSize (Size sze) |
| set the size of the Rect area | |
| Rect | getIntersection (Rect rect) |
| return a Rect that is the intersection of 'this' Rect with the Rect 'rect' | |
| Rect | offset (Point pt) |
| Applies an offset the Rect object. | |
| bool | isPointInRect (Point pt) |
| Return true if the given Point falls within this Rect. | |
| Rect | constrainSizeMax (Size sz) |
| check the size of the Rect object and if it is bigger than sz, resize it so it isn't. | |
| Rect | constrainSizeMin (Size sz) |
| check the size of the Rect object and if it is smaller than sz, resize it so it isn't. | |
| Rect | constrainSize (Size max_sz, Size min_sz) |
| check the size of the Rect object and if it is bigger than max_sz or smaller than min_sz, resize it so it isn't. | |
| bool | operator= (const Rect &rhs) |
Public Attributes | |
| float | top |
| float | bottom |
| float | left |
| float | right |
Class encapsulating operations on a Rectangle.
return a Rect that is the intersection of 'this' Rect with the Rect 'rect'
| bool GUI::Rect::isPointInRect | ( | Point | pt | ) |
check the size of the Rect object and if it is bigger than max_sz or smaller than min_sz, resize it so it isn't.
| max_sz | Size object that describes the maximum dimensions that this Rect should be limited to. |
| min_sz | Size object that describes the minimum dimensions that this Rect should be limited to. |
1.8.1.1