TrueTypeFont Class Reference

#include <truetypefont.h>

List of all members.


Detailed Description

A wrapper around SDL_ttf for allowing the use of TrueType fonts.

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< TextChunkmCache

Constructor & Destructor Documentation

TrueTypeFont::TrueTypeFont ( const std::string &  filename,
int  size,
int  style = 0 
)

Constructor.

Parameters:
filename Font filename.
size Font size.

Definition at line 79 of file truetypefont.cpp.

TrueTypeFont::~TrueTypeFont (  ) 

Destructor.

Definition at line 99 of file truetypefont.cpp.


Member Function Documentation

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 
)

See also:
Font::drawString

Definition at line 110 of file truetypefont.cpp.


Member Data Documentation

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.


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:44 2009 for The Mana World by  doxygen 1.5.5