A class representing a rectangle. More...
#include <shapes.h>
Public Member Functions | |
Rectangle (int x, int y, int width, int height) | |
Construct a new Rectangle object. | |
Rectangle (Axle::Math::Vector2 position, int width, int height) | |
Construct a new Rectangle object. | |
Rectangle (Axle::Math::Vector2 topLeft, Axle::Math::Vector2 bottomRight) | |
Construct a new Rectangle object. | |
void | Draw () const override |
Draw the shape on the screen. | |
Additional Inherited Members | |
![]() | |
Axle::Color | color |
The color of the shape. | |
Axle::Math::Vector2 | position |
The position of the center of the shape. | |
![]() | |
Shape () | |
Construct a new Shape object. | |
A class representing a rectangle.
Axle::Rectangle::Rectangle | ( | int | x, |
int | y, | ||
int | width, | ||
int | height ) |
Construct a new Rectangle object.
x | The x coordinate of the center of the rectangle |
y | The y coordinate of the center of the rectangle |
width | The width of the rectangle |
height | The height of the rectangle |
Axle::Rectangle::Rectangle | ( | Axle::Math::Vector2 | position, |
int | width, | ||
int | height ) |
Construct a new Rectangle object.
position | The position of the center of the rectangle |
width | The width of the rectangle |
height | The height of the rectangle |
Axle::Rectangle::Rectangle | ( | Axle::Math::Vector2 | topLeft, |
Axle::Math::Vector2 | bottomRight ) |
Construct a new Rectangle object.
topLeft | The top left corner of the rectangle |
bottomRight | The bottom right corner of the rectangle |
|
overridevirtual |
Draw the shape on the screen.
Implements Axle::Shape.