glttf::Glyph Class Reference

The basic glyph class. More...

#include <glyph.h>

Inheritance diagram for glttf::Glyph:

glttf::BitmapGlyph glttf::ExtrudedGlyph glttf::OutlineGlyph glttf::PolygonGlyph List of all members.

Public Member Functions

virtual ~Glyph ()
 Destructor.
void draw () const
 Draw this glyph.
float getHeight () const
 Get the height of this glyph.
float getWidth () const
 Get the width of this glyph.
float getBearingX () const
 Get the horizontal bearing of this glyph.
float getBearingY () const
 Get the vertical bearing of this glyph.
float getAdvanceX () const
 Get the horizontal advance of this glyph.
float getAdvanceY () const
 Get the vertical advance of this glyph.
float getMinX () const
 Get the minimum X value of this glyph's bounding box.
float getMaxX () const
 Get the maximum X value of this glyph's bounding box.
float getMinY () const
 Get the minimum Y value of this glyph's bounding box.
float getMaxY () const
 Get the maximum Y value of this glyph's bounding box.

Protected Member Functions

 Glyph (const FT_GlyphSlot glyph)
 Create a new glyph.
GLuint getDisplayList ()
 Get the display list of this glyph.

Detailed Description

The basic glyph class.

The Glyph class (and thus it's subclasses) can't be copied.

Author:
Riku Salminen


Constructor & Destructor Documentation

virtual glttf::Glyph::~Glyph (  )  [virtual]

Destructor.

Destroys the display list of this glyph.

glttf::Glyph::Glyph ( const FT_GlyphSlot  glyph  )  [protected]

Create a new glyph.

Cache glyph metrics and create a display list for drawing the glyph. The constructors of the Glyph class' subclasses should compile the display list.

Strong exception safety. All subclasses of Glyph should also practice strong exception safety.

Parameters:
glyph the glyph which to create this Glyph from
Exceptions:
std::runtime_error if opening the glyph fails or display list creation fails
std::logic_error if glyph is NULL
See also:
FT_GlyphSlot


Member Function Documentation

void glttf::Glyph::draw (  )  const

Draw this glyph.

Calls the internal display list.

float glttf::Glyph::getHeight (  )  const

Get the height of this glyph.

Returns:
the untransformed height of this glyph

float glttf::Glyph::getWidth (  )  const

Get the width of this glyph.

Returns:
the untransformed width of this glyph

float glttf::Glyph::getBearingX (  )  const

Get the horizontal bearing of this glyph.

Returns:
the untransformed horizontal bearing of this glyph

float glttf::Glyph::getBearingY (  )  const

Get the vertical bearing of this glyph.

Returns:
the untransformed vertical of this glyph

float glttf::Glyph::getAdvanceX (  )  const

Get the horizontal advance of this glyph.

Returns:
the untransformed horizontal advance of this glyph

float glttf::Glyph::getAdvanceY (  )  const

Get the vertical advance of this glyph.

Returns:
the untransformed vertical advance of this glyph

float glttf::Glyph::getMinX (  )  const

Get the minimum X value of this glyph's bounding box.

Returns:
the transformed minimum X value of this glyph's bounding box

float glttf::Glyph::getMaxX (  )  const

Get the maximum X value of this glyph's bounding box.

Returns:
the transformed maximum X value of this glyph's bounding box

float glttf::Glyph::getMinY (  )  const

Get the minimum Y value of this glyph's bounding box.

Returns:
the transformed minimum Y value of this glyph's bounding box

float glttf::Glyph::getMaxY (  )  const

Get the maximum Y value of this glyph's bounding box.

Returns:
the transformed maximum Y value of this glyph's bounding box

GLuint glttf::Glyph::getDisplayList (  )  [protected]

Get the display list of this glyph.

Get the internal display list of this glyph.

Returns:
the internal display list of this glyph


The documentation for this class was generated from the following file:
Generated on Mon Jan 8 12:08:38 2007 for GLttf by  doxygen 1.5.1