|
Crazy Eddie's GUI System 0.8.7
|
Class encapsulating operations on a Rectangle. More...
#include <Rect.h>
Inheritance diagram for CEGUI::Rect< T >:
Collaboration diagram for CEGUI::Rect< T >:Public Types | |
| typedef T | value_type |
Public Member Functions | |
| Rect (const T &left, const T &top, const T &right, const T &bottom) | |
| Rect (const Vector2< T > &min, const Vector2< T > &max) | |
| Rect (const Vector2< T > &pos, const Size< T > &size) | |
| Rect (const Rect &r) | |
| Rect & | operator= (const Rect &rhs) |
| void | left (const T &v) |
| const T & | left () const |
| void | top (const T &v) |
| const T & | top () const |
| void | right (const T &v) |
| const T & | right () const |
| void | bottom (const T &v) |
| const T & | bottom () const |
| void | setPosition (const Vector2< T > &min) |
| set the position of the Rect (leaves size in tact) | |
| const Vector2< T > & | getPosition () const |
| Return top-left position of Rect as a Vector2<T> | |
| void | setSize (const Size< T > &size) |
| Size< T > | getSize () const |
| return the size of the Rect area | |
| void | setWidth (const T &w) |
| T | getWidth () const |
| return width of Rect area | |
| void | setHeight (const T &h) |
| T | getHeight () const |
| return height of Rect area | |
| Rect | getIntersection (const Rect &rect) const |
| return a Rect that is the intersection of 'this' Rect with the Rect 'rect' | |
| void | offset (const Vector2< T > &v) |
| Applies an offset the Rect object. | |
| bool | isPointInRect (const Vector2< T > &v) const |
| Return true if the given Vector2 falls within this Rect. | |
| void | constrainSizeMax (const Size< T > &size) |
| check the size of the Rect object and if it is bigger than sz, resize it so it isn't. | |
| void | constrainSizeMin (const Size< T > &size) |
| check the size of the Rect object and if it is smaller than sz, resize it so it isn't. | |
| void | constrainSize (const Size< T > &max_sz, const Size< T > &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) const |
| bool | operator!= (const Rect &rhs) const |
| Rect | operator* (T scalar) const |
| const Rect & | operator*= (T scalar) |
| Rect | operator+ (const Rect &r) const |
Static Public Member Functions | |
| static Rect | zero () |
| finger saving alias for zero sized, zero positioned rect | |
Public Attributes | |
| Vector2< T > | d_min |
| Vector2< T > | d_max |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const Rect &v) |
Class encapsulating operations on a Rectangle.
|
inline |
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. |
References CEGUI::Rect< T >::getSize().
|
inline |
check the size of the Rect object and if it is bigger than sz, resize it so it isn't.
References CEGUI::Rect< T >::getHeight(), and CEGUI::Rect< T >::getWidth().
|
inline |
check the size of the Rect object and if it is smaller than sz, resize it so it isn't.
References CEGUI::Rect< T >::getHeight(), and CEGUI::Rect< T >::getWidth().
|
inline |
return a Rect that is the intersection of 'this' Rect with the Rect 'rect'
|
inline |