#include <common.h>
Public Member Functions | |
| Rect () | |
| Default constructor. | |
| Rect (const Point &p, int w, int h) | |
| Constructor taking parameters. | |
| Point | getPoint () const |
| Get the point representing the top left corner. | |
| void | getGeometry (Point &p, int &w, int &h) const |
| Get the geometry of the rectangle. | |
| int | getWidth () const |
| Get the dimensions of the rectangle. | |
| int | getHeight () const |
| Get the dimensions of the rectangle. | |
Private Attributes | |
| Point | m_Corner |
| int | m_Width |
| int | m_Height |
The Rectangle class basically consists of a Point object, which represents the top-left corner of the rectangle, along with width and height members that define the dimensions of the rectangle
| Rect::Rect | ( | const Point & | p, | |
| int | w, | |||
| int | h | |||
| ) | [inline] |
Constructor taking parameters.
| p | The top-left corner | |
| w | The width | |
| h | The height |
| Point Rect::getPoint | ( | ) | const [inline] |
Get the point representing the top left corner.
| void Rect::getGeometry | ( | Point & | p, | |
| int & | w, | |||
| int & | h | |||
| ) | const [inline] |
Get the geometry of the rectangle.
| p | The top-left corner point | |
| w | The width | |
| h | The height |
1.5.3