#include <rectangle.hpp>
Inheritance diagram for gcn::Rectangle:
Definition at line 67 of file rectangle.hpp.
Public Member Functions | |
Rectangle () | |
Constructor. | |
Rectangle (int x, int y, int width, int height) | |
Constructor. | |
void | setAll (int x, int y, int width, int height) |
Sets the dimension of a rectangle. | |
bool | intersect (const Rectangle &rectangle) |
Checks if another Rectangle intersects with the Rectangle. | |
bool | isPointInRect (int x, int y) const |
Checks if a point is inside the Rectangle. | |
Public Attributes | |
int | x |
int | y |
int | width |
int | height |
gcn::Rectangle::Rectangle | ( | ) |
gcn::Rectangle::Rectangle | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |
bool gcn::Rectangle::intersect | ( | const Rectangle & | rectangle | ) |
Checks if another Rectangle intersects with the Rectangle.
rectangle | another Rectangle. |
Definition at line 89 of file rectangle.cpp.
References height, width, x, and y.
Referenced by gcn::SDLGraphics::fillRectangle(), and gcn::Graphics::pushClipArea().
bool gcn::Rectangle::isPointInRect | ( | int | x, | |
int | y | |||
) | const |
Checks if a point is inside the Rectangle.
x | the point x coordinate. | |
y | the point y coordinate. |
Definition at line 130 of file rectangle.cpp.
Referenced by gcn::SDLGraphics::drawLine(), gcn::SDLGraphics::drawPoint(), gcn::BasicContainer::getWidgetAt(), and gcn::Gui::logic().
void gcn::Rectangle::setAll | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |