Crazy Eddies GUI System
0.6.2
|
Class encapsulating operations on a Rectangle. More...
Public Member Functions | |
Rect (float left, float top, float right, float bottom) | |
Constructor for a Rect. | |
Rect (Point pos, Size sz) | |
Point | getPosition (void) const |
Return top-left postion of Rect as a Point. | |
float | getWidth (void) const |
return width of Rect area | |
float | getHeight (void) const |
return height of Rect area | |
Size | getSize (void) const |
return the size of the Rect area | |
void | setPosition (const 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 (const Size &sze) |
set the size of the Rect area | |
Rect | getIntersection (const Rect &rect) const |
return a Rect that is the intersection of 'this' Rect with the Rect 'rect' More... | |
Rect & | offset (const Point &pt) |
Applies an offset the Rect object. More... | |
bool | isPointInRect (const Point &pt) const |
Return true if the given Point falls within this Rect. More... | |
Rect & | constrainSizeMax (const Size &sz) |
check the size of the Rect object and if it is bigger than sz, resize it so it isn't. More... | |
Rect & | constrainSizeMin (const Size &sz) |
check the size of the Rect object and if it is smaller than sz, resize it so it isn't. More... | |
Rect & | constrainSize (const Size &max_sz, const 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. More... | |
bool | operator== (const Rect &rhs) const |
bool | operator!= (const Rect &rhs) const |
Rect & | operator= (const Rect &rhs) |
Rect | operator* (float scalar) const |
const Rect & | operator*= (float scalar) |
Public Attributes | |
float | d_top |
float | d_bottom |
float | d_left |
float | d_right |
Class encapsulating operations on a Rectangle.
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 getSize(), setHeight(), and setWidth().
check the size of the Rect object and if it is bigger than sz, resize it so it isn't.
References getHeight(), getWidth(), setHeight(), and setWidth().
check the size of the Rect object and if it is smaller than sz, resize it so it isn't.
References getHeight(), getWidth(), setHeight(), and setWidth().
return a Rect that is the intersection of 'this' Rect with the Rect 'rect'
Referenced by CEGUI::Imageset::draw(), CEGUI::Window::getInnerRect(), CEGUI::FalagardTitlebar::getPixelRect(), CEGUI::FalagardSystemButton::getPixelRect(), CEGUI::Window::getPixelRect_impl(), CEGUI::Titlebar::onMouseButtonDown(), CEGUI::FalagardListbox::render(), CEGUI::FalagardMultiColumnList::render(), CEGUI::RenderCache::render(), CEGUI::FrameComponent::render_impl(), CEGUI::ImageryComponent::render_impl(), and CEGUI::MouseCursor::setConstraintArea().
bool CEGUI::Rect::isPointInRect | ( | const Point & | pt | ) | const |
Return true if the given Point falls within this Rect.
pt | Point object describing the position to test. |
Referenced by CEGUI::Listbox::getItemAtPoint(), CEGUI::Tree::getItemAtPoint(), CEGUI::FrameWindow::getSizingBorderAtPoint(), CEGUI::System::injectMouseButtonDown(), CEGUI::System::injectMouseButtonUp(), and CEGUI::Window::isHit().
Applies an offset the Rect object.
pt | Point object containing the offsets to be applied to the Rect. |
Referenced by CEGUI::FalagardMultiLineEditbox::cacheCaratImagery(), CEGUI::FalagardMultiLineEditbox::cacheTextLines(), CEGUI::Image::draw(), CEGUI::System::injectMouseButtonDown(), CEGUI::FalagardListHeaderSegment::render(), CEGUI::RenderCache::render(), CEGUI::CoordConverter::screenToWindow(), and CEGUI::CoordConverter::windowToScreen().