# FTGlyph Class Reference

FTGlyph is the base class for FTGL glyphs. More...

`#include <FTGlyph.h>`

Inheritance diagram for FTGlyph:

## Public Member Functions
virtual | ~FTGlyph ()
| Destructor.
virtual const FTPoint & | Render (const FTPoint &pen, int renderMode)=0
| Renders this glyph at the current pen position.
virtual float | Advance () const
| Return the advance width for this glyph.
virtual const FTBBox & | BBox () const
| Return the bounding box for this glyph.
virtual FT_Error | Error () const
| Queries for errors.
## Protected Member Functions
| FTGlyph (FT_GlyphSlot glyph)
| Create a glyph.
## Friends
class | FTBitmapGlyph
class | FTBufferGlyph
class | FTExtrudeGlyph
class | FTOutlineGlyph
class | FTPixmapGlyph
class | FTPolygonGlyph
class | 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:
  FTBBox

  FTPoint

Definition at line 50 of file FTGlyph.h.

## Constructor & Destructor Documentation

FTGlyph::FTGlyph | ( | FT_GlyphSlot | glyph | ) | `[protected]`

Create a glyph.

Parameters:

  | glyph | The Freetype glyph to be processed

virtual FTGlyph::~FTGlyph | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

virtual float FTGlyph::Advance | ( |  | ) | const`[virtual]`

Return the advance width for this glyph.

Returns:
  advance width.

virtual const FTBBox& FTGlyph::BBox | ( |  | ) | const`[virtual]`

Return the bounding box for this glyph.

Returns:
  bounding box.

virtual FT_Error FTGlyph::Error | ( |  | ) | const`[virtual]`

Queries for errors.

Returns:
  The current error code.

virtual const FTPoint& FTGlyph::Render | ( | const FTPoint & | pen,
|  | int | renderMode |
| ) |  |  | `[pure virtual]`

Renders this glyph at the current pen position.

Parameters:

  | pen | The current pen position.
  | renderMode | Render mode to display

Returns:
  The advance distance for this glyph.

Implemented in FTBitmapGlyph, FTBufferGlyph, FTExtrudeGlyph, FTOutlineGlyph, FTPixmapGlyph, FTPolygonGlyph, and FTTextureGlyph.

## Friends And Related Function Documentation

friend class FTBitmapGlyph`[friend]`

Definition at line 70 of file FTGlyph.h.

friend class FTBufferGlyph`[friend]`

Definition at line 71 of file FTGlyph.h.

friend class FTExtrudeGlyph`[friend]`

Definition at line 72 of file FTGlyph.h.

friend class FTOutlineGlyph`[friend]`

Definition at line 73 of file FTGlyph.h.

friend class FTPixmapGlyph`[friend]`

Definition at line 74 of file FTGlyph.h.

friend class FTPolygonGlyph`[friend]`

Definition at line 75 of file FTGlyph.h.

friend class FTTextureGlyph`[friend]`

Definition at line 76 of file FTGlyph.h.

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

- FTGlyph.h