Creates a Text Texture for use with a renderer Creates a Text Texture from an image file, this can then be used with a renderer.
More...
#include <text.h>
Creates a Text Texture for use with a renderer Creates a Text Texture from an image file, this can then be used with a renderer.
Text::Text |
( |
std::string |
text, |
|
|
std::string |
fontName, |
|
|
SDL_Renderer * |
renderer, |
|
|
int |
r, |
|
|
int |
g, |
|
|
int |
b |
|
) |
| |
Constructs a Text Texture Creates a Text Texture using an image location and a renderer.
- Parameters
-
std::string | The text to display |
std::string | The location of the font file. |
int | The size of the font. |
SDL_Renderer* | The renderer. |
int | The value of red. |
int | The value of green. |
int | The value of blue. |
SDL_Texture * Text::getTexture |
( |
| ) |
|
Getter # Returns a pointer to the Texture Returns a pointer to the Texture data.
void Text::pushToScreen |
( |
SDL_Renderer * |
renderer, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Pushes the image to the Renderer, to the XY Coordinates. This is scaled to the width and height inputed.
- Parameters
-
SDL_Renderer* | The renderer. |
int | x coordinate of the image. |
int | y coordinate of the image. |
int | width of the scaled image. |
int | height of the scaled image. |
SDL_Color Text::fontColour |
|
private |
SDL_Texture* Text::textureData |
|
private |
The documentation for this class was generated from the following files: