SDL Utility
|
The non-instantiable base class for all SDLU shapes. More...
#include <Shape.hpp>
Public Member Functions | |
virtual | ~Shape () |
Deconstructor. More... | |
void | SetColor (const Color &color) |
Sets the color of the shape. More... | |
Color | GetColor () |
Gets the color of the shape. More... | |
![]() | |
Drawable (const Drawable &other)=delete | |
Drawable (Drawable &&other)=delete | |
Drawable & | operator= (const Drawable &other)=delete |
![]() | |
Transformable () | |
Default constructur. More... | |
virtual | ~Transformable () |
Deconstructor. More... | |
Vector2f | GetPosition () |
Returns the position of the object. More... | |
void | SetPosition (const Vector2f &position) |
Sets a new position. More... | |
void | SetPosition (float x, float y) |
Sets a new position. More... | |
void | Move (const Vector2f &position) |
Adds to the current position. More... | |
void | Move (float x, float y) |
Adds to the current position. More... | |
Vector2f | GetOrigin () |
Gets the current local origin. More... | |
void | SetOrigin (const Vector2f &origin) |
Sets a new local origin. More... | |
void | SetOrigin (float x, float y) |
Sets a new local origin. More... | |
Vector2f | GetScale () |
Gets the current scale of the object. More... | |
void | SetScale (const Vector2f &scale) |
Sets a new scale. More... | |
void | SetScale (float x, float y) |
Sets a new scale. More... | |
void | Scale (const Vector2f &scale) |
Scales the object by some amount. More... | |
void | Scale (float x, float y) |
Scales the object by some amount. More... | |
float | GetRotation () |
Gets the current rotation. More... | |
void | SetRotation (float angle) |
Sets a new rotation. More... | |
void | Rotate (float angle) |
Rotates by some amount. More... | |
Protected Member Functions | |
Shape () | |
Default constructor. More... | |
![]() | |
Drawable () | |
virtual void | Draw (SDL_Renderer *const target) const =0 |
Protected Attributes | |
Color | color |
![]() | |
Vector2f | position |
Position of the object. More... | |
Vector2f | origin |
Offset of the top-left corner from the position. More... | |
Vector2f | scale |
Scale of the object. More... | |
float | rotation |
Rotation of the object (in degrees) More... | |
The non-instantiable base class for all SDLU shapes.
|
virtual |
Deconstructor.
|
protected |
Default constructor.
Color Shape::GetColor | ( | ) |
Gets the color of the shape.
void Shape::SetColor | ( | const Color & | color | ) |
Sets the color of the shape.
|
protected |