Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

FontGl Class Reference

#include <FontGl.h>

Inheritance diagram for FontGl:

Font List of all members.

Public Member Functions

void prepareDrawing ()
void setScreenSize (float virtualWidth, float virtualHeight, int displayWidth, int displayHeight)
void loadFontGfx (const string &fileName, const string &fontDefinition="!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
void printChar (const char data, float x, float y, float zoom)
void printString (const string &value, float x, float y, float zoom)
float getWidth (const string &data, float zoom)
float getHeight (float zoom)
void unloadFontGfx ()

Detailed Description

A font for rendering on a OpenGL display.

Definition at line 13 of file FontGl.h.


Member Function Documentation

float FontGl::getHeight float  zoom  )  [virtual]
 

Returns the height of the font at zoom factor zoom.

Implements Font.

Definition at line 142 of file FontGl.cpp.

float FontGl::getWidth const string &  data,
float  zoom
[virtual]
 

Returns the width of a string data at zoom factor zoom.

Implements Font.

Definition at line 130 of file FontGl.cpp.

void FontGl::loadFontGfx const string &  fileName,
const string &  fontDefinition = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
 

Loads a SFont file.

fileName is the name (may include path) of the SFont.

fontDefinition is a string containing the letters in the SFont.

Definition at line 48 of file FontGl.cpp.

void FontGl::prepareDrawing  )  [virtual]
 

Prepares the display for drawing of letters, you may have to prepare the display for drawing other things after this cal.

Implements Font.

Definition at line 23 of file FontGl.cpp.

void FontGl::printChar const char  data,
float  x,
float  y,
float  zoom
[virtual]
 

Writes a character data at x,y with the given zoom factor. prepareDrawing must have been called first.

Implements Font.

Definition at line 85 of file FontGl.cpp.

void FontGl::printString const string &  value,
float  x,
float  y,
float  zoom
[virtual]
 

Writes a string value at x,y with the given zoom factor. prepareDrawing must have been called first.

Implements Font.

Definition at line 114 of file FontGl.cpp.

void FontGl::setScreenSize float  virtualWidth,
float  virtualHeight,
int  displayWidth,
int  displayHeight
 

Sets display size hints for the font.

the virtualWidth and virtualHeight defines the range of coordinates regardless of actual display size, coordinates and font size will be scaled to fit the actual display size.

displayWidth and displayHeight are the actual display size.

Definition at line 76 of file FontGl.cpp.

void FontGl::unloadFontGfx  ) 
 

Frees the OpenGL texture memory used by the font, call this before reloading the font.

Definition at line 147 of file FontGl.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Sep 1 14:46:57 2004 by doxygen 1.3.7