#include <rect.h>
Public Member Functions | |
| Rect (int x=0, int y=0, unsigned int width=0, unsigned int height=0) | |
| int | right () const |
| int | bottom () const |
| bool | operator== (const Rect &rect) const |
| bool | contains (const Point &point) const |
| bool | intersects (const Rect &rect) const |
| bool | intersectInplace (const Rect &rect) |
Public Attributes | |
| int | x |
| int | y |
| int | w |
| int | h |
A Rectangle on screen.
This is a small helper class used for screen coordinate arithmetics. The same thoughts reasong using int as value type as in Point apply.
Definition at line 79 of file rect.h.
| FIFE::Rect::Rect | ( | int | x = 0, |
|
| int | y = 0, |
|||
| unsigned int | width = 0, |
|||
| unsigned int | height = 0 | |||
| ) | [explicit] |
| int FIFE::Rect::bottom | ( | ) | const [inline] |
The Y coordinate of the bottom edge.
Definition at line 157 of file rect.h.
Referenced by FIFE::SDLImage::render(), and FIFE::GLImage::render().

| bool FIFE::Rect::contains | ( | const Point & | point | ) | const [inline] |
| bool FIFE::Rect::intersectInplace | ( | const Rect & | rect | ) | [inline] |
| bool FIFE::Rect::intersects | ( | const Rect & | rect | ) | const [inline] |
| bool FIFE::Rect::operator== | ( | const Rect & | rect | ) | const [inline] |
| int FIFE::Rect::right | ( | ) | const [inline] |
The X coordinate of the right edge.
Definition at line 152 of file rect.h.
Referenced by FIFE::SDLImage::render(), and FIFE::GLImage::render().

| int FIFE::Rect::h |
Height of the rectangle.
Definition at line 92 of file rect.h.
Referenced by bottom(), contains(), intersectInplace(), intersects(), operator==(), FIFE::SDLImage::render(), FIFE::GLImage::render(), FIFE::SDLImage::setClipArea(), and FIFE::GLImage::setClipArea().
| int FIFE::Rect::w |
Width of the rectangle.
Definition at line 89 of file rect.h.
Referenced by contains(), intersectInplace(), intersects(), operator==(), FIFE::SDLImage::render(), FIFE::GLImage::render(), right(), FIFE::SDLImage::setClipArea(), and FIFE::GLImage::setClipArea().
| int FIFE::Rect::x |
The X Coordinate.
Definition at line 83 of file rect.h.
Referenced by contains(), intersectInplace(), intersects(), operator==(), FIFE::SDLImage::render(), FIFE::GLImage::render(), right(), FIFE::SdlGuiGraphics::SdlGuiGraphics(), FIFE::SDLImage::setClipArea(), and FIFE::GLImage::setClipArea().
| int FIFE::Rect::y |
The Y Coordinate.
Definition at line 86 of file rect.h.
Referenced by bottom(), contains(), intersectInplace(), intersects(), operator==(), FIFE::SDLImage::render(), FIFE::GLImage::render(), FIFE::SdlGuiGraphics::SdlGuiGraphics(), FIFE::SDLImage::setClipArea(), and FIFE::GLImage::setClipArea().
1.7.1