#include <truetypefont.h>
NOTE: This class initializes SDL_ttf as necessary.
Definition at line 46 of file truetypefont.h.
Public Member Functions | |
| TrueTypeFont (const std::string &filename, int size, int style=0) | |
| Constructor. | |
| ~TrueTypeFont () | |
| Destructor. | |
| virtual int | getWidth (const std::string &text) const |
| virtual int | getHeight () const |
| void | drawString (gcn::Graphics *graphics, const std::string &text, int x, int y) |
Private Attributes | |
| TTF_Font * | mFont |
| std::list< TextChunk > | mCache |
| TrueTypeFont::TrueTypeFont | ( | const std::string & | filename, | |
| int | size, | |||
| int | style = 0 | |||
| ) |
Constructor.
| filename | Font filename. | |
| size | Font size. |
Definition at line 79 of file truetypefont.cpp.
| TrueTypeFont::~TrueTypeFont | ( | ) |
| int TrueTypeFont::getWidth | ( | const std::string & | text | ) | const [virtual] |
Definition at line 162 of file truetypefont.cpp.
| int TrueTypeFont::getHeight | ( | void | ) | const [virtual] |
Definition at line 169 of file truetypefont.cpp.
| void TrueTypeFont::drawString | ( | gcn::Graphics * | graphics, | |
| const std::string & | text, | |||
| int | x, | |||
| int | y | |||
| ) |
TTF_Font* TrueTypeFont::mFont [private] |
Definition at line 74 of file truetypefont.h.
std::list<TextChunk> TrueTypeFont::mCache [private] |
Definition at line 77 of file truetypefont.h.
1.5.5