FTGL: FTGlyph Class Reference

FTGL 2.4.0

Public Member Functions | Protected Member Functions | Friends
FTGlyph Class Referenceabstract

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

`#include <FTGlyph.h>`

Inheritance diagram for FTGlyph:
[legend]

## 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
class | FTTriangleExtractorGlyph

## 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::FTGlyph | ( | FT_GlyphSlot | glyph | ) |
| protected

Create a glyph.

Parameters

  glyph | The Freetype glyph to be processed

## ◆ ~FTGlyph()

virtual FTGlyph::~FTGlyph | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ Advance()

virtual float FTGlyph::Advance | ( |  | ) | const
| virtual

Return the advance width for this glyph.

Returns
  advance width.

## ◆ BBox()

virtual const FTBBox & FTGlyph::BBox | ( |  | ) | const
| virtual

Return the bounding box for this glyph.

Returns
  bounding box.

## ◆ Error()

virtual FT_Error FTGlyph::Error | ( |  | ) | const
| virtual

Queries for errors.

Returns
  The current error code.

## ◆ Render()

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, FTTextureGlyph, and FTTriangleExtractorGlyph.

## Friends And Related Symbol Documentation

## ◆ FTBitmapGlyph

friend class FTBitmapGlyph
| friend

Definition at line 70 of file FTGlyph.h.

References FTBitmapGlyph.

Referenced by FTBitmapGlyph.

## ◆ FTBufferGlyph

friend class FTBufferGlyph
| friend

Definition at line 71 of file FTGlyph.h.

References FTBufferGlyph.

Referenced by FTBufferGlyph.

## ◆ FTExtrudeGlyph

friend class FTExtrudeGlyph
| friend

Definition at line 72 of file FTGlyph.h.

References FTExtrudeGlyph.

Referenced by FTExtrudeGlyph.

## ◆ FTOutlineGlyph

friend class FTOutlineGlyph
| friend

Definition at line 73 of file FTGlyph.h.

References FTOutlineGlyph.

Referenced by FTOutlineGlyph.

## ◆ FTPixmapGlyph

friend class FTPixmapGlyph
| friend

Definition at line 74 of file FTGlyph.h.

References FTPixmapGlyph.

Referenced by FTPixmapGlyph.

## ◆ FTPolygonGlyph

friend class FTPolygonGlyph
| friend

Definition at line 75 of file FTGlyph.h.

References FTPolygonGlyph.

Referenced by FTPolygonGlyph.

## ◆ FTTextureGlyph

friend class FTTextureGlyph
| friend

Definition at line 76 of file FTGlyph.h.

References FTTextureGlyph.

Referenced by FTTextureGlyph.

## ◆ FTTriangleExtractorGlyph

friend class FTTriangleExtractorGlyph
| friend

Definition at line 77 of file FTGlyph.h.

References FTTriangleExtractorGlyph.

Referenced by FTTriangleExtractorGlyph.

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

- FTGlyph.h