Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FTGlyph Class Reference

#include <FTGlyph.h>

Inheritance diagram for FTGlyph:

FTBitmapGlyph FTExtrdGlyph FTOutlineGlyph FTPixmapGlyph FTPolyGlyph FTTextureGlyph

Detailed Description

FTGlyph is the base class for FTGL glyphs.

It provides the interface between Freetype glyphs and their openGL renderable counterparts. This is an abstract class and derived classes must implement the render function.

See also:
FTGlyphContainer

FTBBox

FTPoint

Definition at line 25 of file FTGlyph.h.

Public Member Functions

 FTGlyph (FT_GlyphSlot glyph, bool useDisplayList=true)
 Constructor.

virtual ~FTGlyph ()
 Destructor.

virtual const FTPointRender (const FTPoint &pen)=0
 Renders this glyph at the current pen position.

const FTPointAdvance () const
 Return the advance width for this glyph.

const FTBBoxBBox () const
 Return the bounding box for this glyph.

FT_Error Error () const
 Queries for errors.


Protected Attributes

FTPoint advance
 The advance distance for this glyph.

FTBBox bBox
 The bounding box of this glyph.

bool useDisplayList
 Flag to enable or disable the use of Display Lists inside FTGL true turns ON display lists.

FT_Error err
 Current error code.


Constructor & Destructor Documentation

FTGlyph::FTGlyph FT_GlyphSlot  glyph,
bool  useDisplayList = true
 

Constructor.

Parameters:
glyph The Freetype glyph to be processed
useDisplayList Enable or disable the use of Display Lists for this glyph true turns ON display lists. false turns OFF display lists.

Definition at line 4 of file FTGlyph.cpp.

References advance, and bBox.

FTGlyph::~FTGlyph  )  [virtual]
 

Destructor.

Definition at line 16 of file FTGlyph.cpp.


Member Function Documentation

const FTPoint& FTGlyph::Advance  )  const [inline]
 

Return the advance width for this glyph.

Returns:
advance width.

Definition at line 56 of file FTGlyph.h.

const FTBBox& FTGlyph::BBox  )  const [inline]
 

Return the bounding box for this glyph.

Returns:
bounding box.

Definition at line 63 of file FTGlyph.h.

FT_Error FTGlyph::Error  )  const [inline]
 

Queries for errors.

Returns:
The current error code.

Definition at line 70 of file FTGlyph.h.

virtual const FTPoint& FTGlyph::Render const FTPoint pen  )  [pure virtual]
 

Renders this glyph at the current pen position.

Parameters:
pen The current pen position.
Returns:
The advance distance for this glyph.

Implemented in FTBitmapGlyph, FTExtrdGlyph, FTOutlineGlyph, FTPixmapGlyph, FTPolyGlyph, and FTTextureGlyph.


Field Documentation

FTPoint FTGlyph::advance [protected]
 

The advance distance for this glyph.

Definition at line 76 of file FTGlyph.h.

Referenced by FTGlyph().

FTBBox FTGlyph::bBox [protected]
 

The bounding box of this glyph.

Definition at line 81 of file FTGlyph.h.

Referenced by FTGlyph().

FT_Error FTGlyph::err [protected]
 

Current error code.

Zero means no error.

Definition at line 93 of file FTGlyph.h.

bool FTGlyph::useDisplayList [protected]
 

Flag to enable or disable the use of Display Lists inside FTGL true turns ON display lists.

false turns OFF display lists.

Definition at line 88 of file FTGlyph.h.


The documentation for this class was generated from the following files:
Generated on Sun Dec 5 22:24:07 2004 for FTGL by doxygen 1.3.6