cGLUTBitmapFont Class Reference
[Widgets]

OpenGL Fonts provided with the GLUT library. More...

#include <CFont.h>

Inheritance diagram for cGLUTBitmapFont:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 cGLUTBitmapFont ()
 Constructor of cGLUTBitmapFont.
virtual ~cGLUTBitmapFont ()
 Destructor of cGLUTBitmapFont.
virtual int getCharacterWidth (const unsigned char &a_char)
 Get the width of a particular character.
virtual int renderString (const char *a_str)

Protected Member Functions

int getBestFontMatch ()
 Return the index of the current Font in the table of font names.


Detailed Description

OpenGL Fonts provided with the GLUT library.

Member Function Documentation

int cGLUTBitmapFont::getBestFontMatch (  )  [protected]

Return the index of the current Font in the table of font names.

Return the index of the current font in the table of font name.

Returns:
-1 for error or an index into glut_bitmap_fonts

int cGLUTBitmapFont::getCharacterWidth ( const unsigned char &  a_char  )  [virtual]

Get the width of a particular character.

Get the width of a particular character.

Returns:
Returns the width of this character in pixels, or -1 for an error
Parameters:
a_char The character (e.g. 'a') to look up. Characters less than 32 ('A') will generate errors.

Reimplemented from cFont.

int cGLUTBitmapFont::renderString ( const char *  a_str  )  [virtual]

Renders a string, should not contain any newlines.
Returns 0 for success, -1 for error.

Renders an actual string of text, initializing the font if necessary.

Parameters:
a_str The string to render; should not include newlines
Returns:
0 for success, -1 for error

Implements cFont.


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


CHAI3D 2.0.0 documentation
Please address any questions to support@chai3d.org
(C) 2003-2009 - CHAI 3D
All Rights Reserved.