Basic class used to describe a portion of a texture to be applied to a Quad.
More...
#include <sprite.h>
Basic class used to describe a portion of a texture to be applied to a Quad.
Definition at line 55 of file sprite.h.
Class constructor.
- Parameters
-
SpriteName | The name to be given to this sprite. |
UVTop | The top position of this sprite on the Atlas. |
UVLeft | The left position of this sprite on the Atlas. |
UVBottom | The bottom position of this sprite on the Atlas. |
UVRight | The right position of this sprite on the Atlas. |
ParentAtlas | The TextureAtlas this sprite belongs to. |
Definition at line 65 of file sprite.h.
Gets the pixel position on the Atlas of a corner belonging to this Sprite.
- Parameters
-
Corner | The corner to retrieve the coordinates for. |
- Returns
- Returns a Vector2 containing the Atlas pixel position of the specific corner.
Definition at line 138 of file sprite.h.
Real Mezzanine::UI::Sprite::GetHeight |
( |
| ) |
const |
|
inline |
Gets the sprite's height on the Atlas texture.
- Returns
- Returns a Real representing the height of this sprite on the Atlas Texture in pixels.
Definition at line 129 of file sprite.h.
Vector2 Mezzanine::UI::Sprite::GetPosition |
( |
| ) |
const |
|
inline |
Gets the position of the sprite on the Atlas texture.
- Returns
- Returns a Vector2 containing the top-left position of this sprite on the Atlas texture in pixels.
Definition at line 121 of file sprite.h.
Gets the relative position on the Atlas of a corner belonging to this Sprite.
- Parameters
-
Corner | The corner to retrieve the coordinates for. |
- Returns
- Returns a Vector2 containing the Atlas relative position of the specific corner.
Definition at line 153 of file sprite.h.
Vector2 Mezzanine::UI::Sprite::GetSize |
( |
| ) |
const |
|
inline |
Gets the size of the sprite on the Atlas texture.
- Returns
- Returns a Vector2 containing the size of this sprite on the Atlas Texture in pixels.
Definition at line 125 of file sprite.h.
Real Mezzanine::UI::Sprite::GetUVBottom |
( |
| ) |
const |
|
inline |
Gets the Bottom coordinate on the Atlas texture.
- Returns
- Returns a Real representing the bottom position of this sprite on the Atlas texture in pixels.
Definition at line 109 of file sprite.h.
Real Mezzanine::UI::Sprite::GetUVLeft |
( |
| ) |
const |
|
inline |
Gets the Left coordinate on the Atlas texture.
- Returns
- Returns a Real representing the left position of this sprite on the Atlas texture in pixels.
Definition at line 113 of file sprite.h.
Real Mezzanine::UI::Sprite::GetUVRight |
( |
| ) |
const |
|
inline |
Gets the Right coordinate on the Atlas texture.
- Returns
- Returns a Real representing the right position of this sprite on the Atlas texture in pixels.
Definition at line 117 of file sprite.h.
Real Mezzanine::UI::Sprite::GetUVTop |
( |
| ) |
const |
|
inline |
Gets the Top coordinate on the Atlas texture.
- Returns
- Returns a Real representing the top position of this sprite on the Atlas texture in pixels.
Definition at line 105 of file sprite.h.
Real Mezzanine::UI::Sprite::GetWidth |
( |
| ) |
const |
|
inline |
Gets the sprite's width on the Atlas texture.
- Returns
- Returns a Real representing the width of this sprite on the Atlas Texture in pixels.
Definition at line 133 of file sprite.h.
The documentation for this class was generated from the following file:
- /home/sqeaky/Code/MezzanineFresh/Mezzanine/src/UI/sprite.h