Font Class Reference

Bitmap font. More...

#include <Engine/Font.h>

List of all members.

Public Member Functions

 Font (NE::Sprite *pSprite, const USize2 &letterSize, const unsigned char startingLetter)
USize2 getLetterSize (void)
 Get the size of one letter.
USize2 getStringSize (const std::string &string)
 Get the size of the text when using this Font.
bool draw (const NE::Renderer &r, const std::string &text, const IVec2 &position)
 Draw a text with the font.

Detailed Description

Bitmap font.


Constructor & Destructor Documentation

Font::Font ( NE::Sprite pSprite,
const USize2 letterSize,
const unsigned char  startingLetter 
)
Parameters:
pSprite the Sprite to use as source
letterSize the size of one letter
startingLetter the letter with which one the bitmap is starting

Member Function Documentation

bool Font::draw ( const NE::Renderer r,
const std::string &  text,
const IVec2 position 
)

Draw a text with the font.

Parameters:
r the NE::Renderer to use to draw the Font
text the Text to draw
position the position where to draw
Returns:
true if all goes right
USize2 Font::getLetterSize ( void   )  [inline]

Get the size of one letter.

Returns:
the size of one letter
USize2 Font::getStringSize ( const std::string &  string  ) 

Get the size of the text when using this Font.

Parameters:
string The text to calculate the size
Returns:
the size of the surface to render the text

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs
Generated on Thu Oct 6 22:11:38 2011 for WE_Kit by  doxygen 1.6.3