#include <video_fonts.h>
Public Member Functions | |
void | draw (string text, SDL_Surface *screen, int draw_x, int draw_y) |
Draws a text into screen, specifying all the parametres. | |
void | draw (string text, SDL_Surface *scr) |
Draws a text into screen, using the object attributes. | |
void | free () |
Frees memory closing the loaded font. | |
NGT_Font () | |
NGT_Font (string filename, int size) | |
Constructor, with two attributes to initialize. | |
int | LoadTTF (string filename, int size) |
Loads a font, passing the path to the file, and the size for drawing. | |
int | LoadTTF () |
Loads the font. Uses the public attributes of the class. | |
Public Attributes | |
string | filename |
Path (relative or absolute) to the ttf font file. | |
int | size |
Size of the font. | |
int | mode |
'Drawing mode. | |
int | x |
X coordinate for drawing. | |
int | y |
Y coordinate for drawing. | |
SDL_Color | color |
Color of the font. |
This class provides basic functions and objects to manage and draw fonts.
Definition at line 26 of file video_fonts.h.
|
Definition at line 53 of file video_fonts.h. |
|
Constructor, with two attributes to initialize.
|
|
Draws a text into screen, using the object attributes.
Definition at line 34 of file video_fonts.cpp. References color, NGT_Surface::draw(), NGT_Surface::free(), mode, NGT_Surface::surface, TEXT_BLENDED, TEXT_NONE, x, NGT_Surface::x, y, and NGT_Surface::y. |
|
Draws a text into screen, specifying all the parametres.
Definition at line 11 of file video_fonts.cpp. References color, NGT_Surface::draw(), NGT_Surface::free(), mode, NGT_Surface::surface, TEXT_BLENDED, TEXT_NONE, NGT_Surface::x, and NGT_Surface::y. |
|
Frees memory closing the loaded font.
Definition at line 51 of file video_fonts.h. |
|
Loads the font. Uses the public attributes of the class.
Definition at line 60 of file video_fonts.cpp. |
|
Loads a font, passing the path to the file, and the size for drawing.
Definition at line 66 of file video_fonts.cpp. |
|
Color of the font.
Definition at line 45 of file video_fonts.h. Referenced by draw(). |
|
Path (relative or absolute) to the ttf font file.
Definition at line 29 of file video_fonts.h. Referenced by LoadTTF(). |
|
'Drawing mode.
Available modes:
TEXT_NONE = Draw the text as a solid, without any filter. Definition at line 39 of file video_fonts.h. Referenced by draw(). |
|
Size of the font.
Definition at line 31 of file video_fonts.h. Referenced by LoadTTF(). |
|
X coordinate for drawing.
Definition at line 41 of file video_fonts.h. Referenced by draw(). |
|
Y coordinate for drawing.
Definition at line 43 of file video_fonts.h. Referenced by draw(). |