mx::mxTTF_Font Class Reference

List of all members.

Public Member Functions

 mxTTF_Font (std::string font_name, int font_size)
 ~mxTTF_Font ()
SDL_Surface * renderText (std::string text, SDL_Color col)
void renderText (mxSurface &surface, std::string text, SDL_Color col)

Static Public Member Functions

static void Init ()
static void Quit ()


Detailed Description

TTF_Font

Definition at line 12 of file mxttf.h.


Constructor & Destructor Documentation

mx::mxTTF_Font::mxTTF_Font ( std::string  font_name,
int  font_size 
) [explicit]

mxTTF_Font explicit constructor

Parameters:
font_name name of the true type font to be loaded
font_size the size of the font to be loaded

mx::mxTTF_Font::~mxTTF_Font (  ) 

destructor


Member Function Documentation

static void mx::mxTTF_Font::Init (  )  [inline, static]

Init setup the SDL_ttf library

Definition at line 40 of file mxttf.h.

00040                                    {
00041                         if(!TTF_WasInit())
00042                                 TTF_Init();
00043                 }

static void mx::mxTTF_Font::Quit (  )  [inline, static]

Quit the SDL_ttf library

Definition at line 45 of file mxttf.h.

00045                                    {
00046                         TTF_Quit();
00047                 }

void mx::mxTTF_Font::renderText ( mxSurface surface,
std::string  text,
SDL_Color  col 
)

renderText

Parameters:
surface mx::mxSurface to hold surface of rendered text
col the color of the text

SDL_Surface* mx::mxTTF_Font::renderText ( std::string  text,
SDL_Color  col 
)

renderText

Parameters:
text string of characters to be printed onto a Surface
col Color of text
Returns:
SDL_Surface * of text of color col


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

Generated on Wed Jun 10 14:52:02 2009 for libmx by  doxygen 1.5.8