Annchienta::Font Class Reference

List of all members.

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


Detailed Description

Class used for holding, loading fonts.

Constructor & Destructor Documentation

Annchienta::Font::Font ( const char *  filename,
int  height = 14 
)

Attempts to load a valid TTF font.

Parameters:
filename TTF font to be loaded.
height Size for the new font. (in pixels)

Annchienta::Font::~Font (  ) 


Member Function Documentation

void Annchienta::Font::draw ( const char *  text,
int  x,
int  y 
) const

Draws a font to the screen.

Note:
Use VideoManager::drawString().

Not available in Python.

int Annchienta::Font::getHeight (  )  const

Returns:
The height (size) of this font.

int Annchienta::Font::getLineHeight (  )  const

Returns:
The height (size) of this font and a little extra space for space between lines.

int Annchienta::Font::getStringWidth ( const char *  text  )  const

Predict how wide a string will be when drawn.

Parameters:
text The string of which the width should be calculated.
Returns:
The width in pixels.


Member Data Documentation

int* Annchienta::Font::advance [private]

int Annchienta::Font::height [private]

GLuint Annchienta::Font::list [private]

GLuint* Annchienta::Font::textures [private]


Generated on Wed Feb 4 16:31:47 2009 for Annchienta by  doxygen 1.5.7.1