Public Member Functions | |
void | draw (const char *text, int x, int y) const |
Font (const char *filename, int height=14) | |
int | getHeight () const |
int | getLineHeight () const |
int | getStringWidth (const char *text) const |
~Font () | |
Private Attributes | |
int * | advance |
int | height |
int | lineHeight |
GLuint | list |
GLuint * | textures |
Annchienta::Font::Font | ( | const char * | filename, | |
int | height = 14 | |||
) |
Attempts to load a valid TTF font.
filename | TTF font to be loaded. | |
height | Size for the new font. (in pixels) |
Annchienta::Font::~Font | ( | ) |
void Annchienta::Font::draw | ( | const char * | text, | |
int | x, | |||
int | y | |||
) | const |
Draws a font to the screen.
Not available in Python.
int Annchienta::Font::getHeight | ( | ) | const |
int Annchienta::Font::getLineHeight | ( | ) | const |
int Annchienta::Font::getStringWidth | ( | const char * | text | ) | const |
Predict how wide a string will be when drawn.
text | The string of which the width should be calculated. |
int* Annchienta::Font::advance [private] |
int Annchienta::Font::height [private] |
int Annchienta::Font::lineHeight [private] |
GLuint Annchienta::Font::list [private] |
GLuint* Annchienta::Font::textures [private] |