Provides a centralized, static interface for all texture-related operations. More...
#include <TextureManager.h>

Static Public Member Functions | |
| static SDL_Point | GetSizeOfSurface (const char *fileName) |
| Gets the dimensions of an image file without loading the full texture. | |
| static SDL_Texture * | LoadTexture (const char *fileName) |
| Loads a texture from an image file. | |
| static SDL_Texture * | LoadTexture (const SDL_Colour colour, const char *text) |
| Creates a texture by rendering text. | |
| static SDL_Texture * | LoadTexture (SDL_Rect &rect, SDL_Colour colour) |
| Creates a solid-color rectangular texture. | |
| static void | DrawTexture (SDL_Texture *tex, SDL_Rect &src, SDL_Rect &dest) |
| Draws a portion of a texture. | |
| static void | DrawTexture (SDL_Texture *tex, SDL_Rect &dest) |
| Draws an entire texture to a destination rectangle. | |
| static void | DrawTexture (SDL_Texture *tex, SDL_Rect &src, SDL_Rect &dest, const double angle) |
| Draws a portion of a texture with rotation. | |
| static void | DrawTexture (SDL_Texture *tex, SDL_Rect &dest, const double angle) |
| Draws an entire texture with rotation. | |
Static Public Attributes | |
| static TTF_Font * | font |
| The global font used for text rendering. | |
Provides a centralized, static interface for all texture-related operations.
This class handles loading textures from files, creating textures from text or colors, and drawing them to the global renderer.
|
static |
Draws an entire texture to a destination rectangle.
| tex | The source texture. |
| dest | The destination rectangle on the screen. |

|
static |
Draws an entire texture with rotation.
| tex | The source texture. |
| dest | The destination rectangle. |
| angle | The rotation angle in degrees. |

|
static |
Draws a portion of a texture.
| tex | The source texture. |
| src | The source rectangle defining the portion to draw. |
| dest | The destination rectangle on the screen. |


|
static |
Draws a portion of a texture with rotation.
| tex | The source texture. |
| src | The source rectangle. |
| dest | The destination rectangle. |
| angle | The rotation angle in degrees. |

Gets the dimensions of an image file without loading the full texture.
| fileName | The path to the image file. |


|
static |
Loads a texture from an image file.
| fileName | The path to the image file. |


|
static |
Creates a texture by rendering text.
| colour | The color of the text. |
| text | The string to render. |

|
static |
Creates a solid-color rectangular texture.
| rect | The dimensions of the texture to create. |
| colour | The color of the texture. |
