Represents a 2D grid of texels.
More...
#include <Texture.h>
|
| | Texture () |
| |
| virtual | ~Texture () |
| |
| virtual bool | Load (const std::string &path, ResourceManager *pManager) |
| | Load the desired font into memory.
|
| |
| int | GetWidth () const |
| | Gets the width of the texture in pixels.
|
| |
| int | GetHeight () const |
| | Gets the height of the texture in pixels.
|
| |
| Vector2 | GetSize () const |
| | Gets the dimensions of the texture.
|
| |
| Vector2 | GetCenter () const |
| | Gets the center position of the texture.
|
| |
| virtual bool | IsCloneable () const |
| | Used to determine if the texture is cloneable.
|
| |
| virtual ALLEGRO_BITMAP * | GetAllegroBitmap () const |
| | Get the allegro bitmap representation of the texture.
|
| |
| virtual | ~Resource () |
| |
| unsigned short | GetResourceID () const |
| | Gets the ID of the resource.
|
| |
|
| virtual void | SetTexture (ALLEGRO_BITMAP *pBitmap) |
| | Used to set the underlaying allegro bitmap.
|
| |
| void | Split (const std::string &line, const char delimeter, std::vector< std::string > &elements) |
| | Splits a string into a vector of strings.
|
| |
| void | ParseComments (std::string &line) |
| | Removes c-style, single-line comments from a line of text.
|
| |
| void | TrimLine (std::string &line) |
| | Removes white-space at the front and end of a line of text.
|
| |
| ResourceManager * | GetResourceManager () |
| | Gets a pointer to the ResourceManager that was used to load the resource.
|
| |
| virtual Resource * | Clone () |
| | Clones a resource.
|
| |
Represents a 2D grid of texels.
Definition at line 20 of file Texture.h.
◆ Texture()
| KatanaEngine::Texture::Texture |
( |
| ) |
|
◆ ~Texture()
| KatanaEngine::Texture::~Texture |
( |
| ) |
|
|
virtual |
◆ GetAllegroBitmap()
| virtual ALLEGRO_BITMAP * KatanaEngine::Texture::GetAllegroBitmap |
( |
| ) |
const |
|
inlinevirtual |
Get the allegro bitmap representation of the texture.
- Returns
- Returns the underlaying allegro bitmap.
Definition at line 57 of file Texture.h.
◆ GetCenter()
| Vector2 KatanaEngine::Texture::GetCenter |
( |
| ) |
const |
|
inline |
Gets the center position of the texture.
- Returns
- Returns the center position.
Definition at line 48 of file Texture.h.
◆ GetHeight()
| int KatanaEngine::Texture::GetHeight |
( |
| ) |
const |
|
inline |
Gets the height of the texture in pixels.
- Returns
- Returns the height in pixels.
Definition at line 40 of file Texture.h.
◆ GetSize()
| Vector2 KatanaEngine::Texture::GetSize |
( |
| ) |
const |
|
inline |
Gets the dimensions of the texture.
- Returns
- Returns the dimensions.
Definition at line 44 of file Texture.h.
◆ GetWidth()
| int KatanaEngine::Texture::GetWidth |
( |
| ) |
const |
|
inline |
Gets the width of the texture in pixels.
- Returns
- Returns the width in pixels.
Definition at line 36 of file Texture.h.
◆ IsCloneable()
| virtual bool KatanaEngine::Texture::IsCloneable |
( |
| ) |
const |
|
inlinevirtual |
Used to determine if the texture is cloneable.
- Returns
- Returns true if the texture is clonable, false otherwise.
Implements KatanaEngine::Resource.
Definition at line 53 of file Texture.h.
◆ Load()
| bool KatanaEngine::Texture::Load |
( |
const std::string & | path, |
|
|
ResourceManager * | pManager ) |
|
virtual |
◆ SetTexture()
| void KatanaEngine::Texture::SetTexture |
( |
ALLEGRO_BITMAP * | pBitmap | ) |
|
|
protectedvirtual |
Used to set the underlaying allegro bitmap.
- Parameters
-
| pBitmap | The bitmap to set. |
Definition at line 49 of file Texture.cpp.
The documentation for this class was generated from the following files: