Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglBitmapFontGLX Class Reference

Font that uses glx to rasterize an X font. More...

#include <sglBitmapFont.hpp>

Inheritance diagram for sglBitmapFontGLX::

sglBitmapFont sglObject List of all members.

Public Methods

 sglBitmapFontGLX (Font font)
 ~sglBitmapFontGLX ()
virtual sglBitmapFontclone () const
virtual void rasterString (const char *str, int len=-1) const
virtual unsigned int getHeight () const
virtual unsigned int getDescent () const
virtual unsigned int getCharWidth (char c) const
virtual unsigned int getStringWidth (const string &str) const

Detailed Description

Font that uses glx to rasterize an X font.

Definition at line 196 of file sglBitmapFont.hpp.


Constructor & Destructor Documentation

sglBitmapFontGLX::sglBitmapFontGLX ( Font font )
 

Construct a font from the given X font. NOTE: A gl context should be current when this method is called.

Parameters:
font   the X font

sglBitmapFontGLX::~sglBitmapFontGLX ( )
 

NOTE: A gl context should be current when this method is called.


Member Function Documentation

sglBitmapFont * sglBitmapFontGLX::clone ( ) const [virtual]
 

Create a copy of this font. The copy will have display lists that are valid for the current context.

Returns:
a copy of this font

Reimplemented from sglBitmapFont.

void sglBitmapFontGLX::rasterString ( const char * str,
int len = -1 ) const [virtual]
 

Renders a bitmap string at the current raster position. Characters should be limited to the ASCII range 0-127.

Parameters:
str   the string to render
len   the length of the string. If len is less than zero, strlen() will be used to determine the length.

Reimplemented from sglBitmapFont.

unsigned int sglBitmapFontGLX::getHeight ( ) const [virtual]
 

Gets the height of the font in pixels.

Returns:
the height of the font in pixels

Reimplemented from sglBitmapFont.

unsigned int sglBitmapFontGLX::getDescent ( ) const [virtual]
 

Gets the extent of the font below the baseline in pixels.

Returns:
the extent of the font below the baseline in pixels.

Reimplemented from sglBitmapFont.

unsigned int sglBitmapFontGLX::getCharWidth ( char c ) const [virtual]
 

Gets the width of the given character.

Parameters:
c   the character whose width will be returned
Returns:
the width of the given character

Reimplemented from sglBitmapFont.

unsigned int sglBitmapFontGLX::getStringWidth ( const string & str ) const [virtual]
 

Gets the width of the given string.

Parameters:
str   the string whose width will be returned
Returns:
the width of the given string

Reimplemented from sglBitmapFont.


The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:06 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001