Clase que encapsula una única textura compuesta.
More...
#include <sdl_texturearray.h>
|
EXPORT | TextureArray (Renderer &render, const std::string file, int tileWidth=0, int tileHeight=0) |
| Constructor.
|
|
EXPORT | ~TextureArray () |
| Destructor.
|
|
EXPORT int | W () |
| Obtiene la anchura de las subtexturas.
|
|
EXPORT int | H () |
| Obtiene la altura de las subtexturas.
|
|
SDL_Texture * | Get () |
| Obtiene un puntero a la estructura SDL_Texture.
|
|
EXPORT | operator SDL_Texture * () |
| Obtiene un puntero a la estructura SDL_Texture.
|
|
EXPORT void | Draw (Point punto, int index) |
| Traslada la subtextura al punto indicado.
|
|
Clase que encapsula una única textura compuesta.
La textura contiene un array de subtexturas del mismo tamaño que pueden ser mostradas individualmente
◆ TextureArray()
EXPORT sdl::TextureArray::TextureArray |
( |
Renderer & | render, |
|
|
const std::string | file, |
|
|
int | tileWidth = 0, |
|
|
int | tileHeight = 0 ) |
Constructor.
- Parameters
-
render | Renderer& contexto de renderizado |
file | string ruta del fichero que contiene el gráfico de la textura |
tileWidth | int anchura de cada subtextura |
tileHeight | int altura de cada subtextura |
◆ ~TextureArray()
EXPORT sdl::TextureArray::~TextureArray |
( |
| ) |
|
|
inline |
Destructor.
Destruye la textura especificada.
◆ Draw()
EXPORT void sdl::TextureArray::Draw |
( |
Point | punto, |
|
|
int | index ) |
|
inline |
Traslada la subtextura al punto indicado.
- Parameters
-
punto | Point punto de destino |
index | int índice de la subtextura |
◆ H()
EXPORT int sdl::TextureArray::H |
( |
| ) |
|
|
inline |
Obtiene la altura de las subtexturas.
- Returns
- int valor de la altura de las subtexturas
◆ W()
EXPORT int sdl::TextureArray::W |
( |
| ) |
|
|
inline |
Obtiene la anchura de las subtexturas.
- Returns
- int valor de la anchura de las subtexturas
◆ cols
int sdl::TextureArray::cols |
|
protected |
Número de filas y columnas
Anchura y altura de cada subtextura
◆ rect
std::vector<Rect> sdl::TextureArray::rect |
|
protected |
Rectángulos contenedores de subtexturas
◆ renderer
◆ texture
SDL_Texture* sdl::TextureArray::texture |
|
protected |
The documentation for this class was generated from the following files: