|
| | Rectangle () |
| | Constructs an empty rectangle.
|
| | Rectangle (const Point_2D &position, const Size_2D &size) |
| | Constructs a rectangle from a position and a size.
|
| | Rectangle (const Size_2D &size) |
| | Constructs a rectangle from a size at position 0,0.
|
| | Rectangle (const int x, const int y, const unsigned int width=0, const unsigned int height=0) |
| | Constructs a rectangle from an x,y position and width,height size.
|
| | Rectangle (const Rectangle &rectangle) |
| | Constructs a rectangle as a copy of another rectangle.
|
| Rectangle & | operator= (const Rectangle &rectangle) |
| | Assign the position and size of another rectangle to this rectangle.
|
| Point_2D | position () const |
| | Get the rectangle position.
|
| Rectangle & | position (const Point_2D &point) |
| | Set the position of the rectangle.
|
| Rectangle & | position (const int x, const int y) |
| | Set the x,y position of the rectangle.
|
| Size_2D | size () const |
| | Get the rectangle size.
|
| Rectangle & | size (const Size_2D &size) |
| | Set the size of the rectangle.
|
| Rectangle & | size (const unsigned int width, const unsigned int height) |
| | Set the width,height of the rectangle.
|
| Rectangle & | operator&= (const Rectangle &rectangle) |
| | Take the intersection with another rectangle.
|
| | Point_2D () |
| | Constructs a point at position 0,0.
|
| | Point_2D (const int &x, const int &y) |
| | Constructs a point at position x,y.
|
| | Point_2D (const Point_2D &point) |
| | Constructs a point from another point.
|
| Point_2D & | operator= (const Point_2D &point) |
| | Assign the position of another point to this point.
|
| int | x () const |
| | Get the horizontal (x-axis) position.
|
| Point_2D & | x (const int &x_position) |
| | Set the horizontal (x-axis) position.
|
| int | y () const |
| | Get the vertical (y-axis) position.
|
| Point_2D & | y (const int &y_position) |
| | Set the vertical (y-axis) position.
|
| | Size_2D () |
| | Constructs an empty 2D size.
|
| | Size_2D (const unsigned int &width, const unsigned int &height) |
| | Constructs a specific size.
|
| | Size_2D (const unsigned int &side) |
| | Constructs a size of equal width and height.
|
| | Size_2D (const Size_2D &size) |
| | Constructs a size from another size.
|
| Size_2D & | operator= (const Size_2D &size) |
| | Assign the size of another size to this size.
|
| unsigned int | width () const |
| | Get the width of the size.
|
| Size_2D & | width (const unsigned int &width) |
| | Set the width of the size.
|
| unsigned int | height () const |
| | Get the height of the size.
|
| Size_2D & | height (const unsigned int &height) |
| | Set the height of the size.
|
| unsigned long | area () const |
| | Get the area of this size.
|
A Rectangle is a position with a size.
- Author
- Bradford Castalia, UA/PIRL
- Version
- 1.7
- See also
- Point_2D
-
Size_2D