Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

OGLFT::Filled Class Reference

Render text as a filled polygons. More...

#include <OGLFT.h>

Inheritance diagram for OGLFT::Filled:

OGLFT::Polygonal OGLFT::Face OGLFT::Solid List of all members.

Public Methods

 Filled (const char *filename, float point_size=12, FT_UInt resolution=100)
 Filled (FT_Face face, float point_size=12, FT_UInt resolution=100)
virtual ~Filled (void)
VertexInfoListextraVertices (void)

Protected Methods

void renderGlyph (FT_Face face, FT_UInt glyph_index)

Protected Attributes

GLfloat depth_offset_

Detailed Description

Render text as a filled polygons.

filled_class.png
Each glyph is drawn as a filled polygon. The contours are extracted from the font file through FreeType. FreeType is used to scale the contours to the given size. Then the GLU tessellation routines are used to tessellate the contours into polygons (well, triangles). By default, these are drawn in GL_FILL polygon mode, but any other polygon mode can be specified.

Usually, the polygons are drawn only in the foreground color, however, you may supply ColorTess and TextureTess objects which can alter the color or texture coordinates of each vertex individually. You can also use the per-glyph display list functionality to alter the attributes of each glyph.

The only complexity to this style is selecting the point size. Since the glyphs are drawn as polygons, they are subject to the viewing and modeling transformations. The point size is nominally chosen to be the same as a raster image generated at the given resolution. Some experimentation with point size and resolution may be necessary to achieve the desired results.


Constructor & Destructor Documentation

OGLFT::Filled::Filled const char *    filename,
float    point_size = 12,
FT_UInt    resolution = 100
 

Parameters:
filename  the filename which contains the font face.
point_size  the initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12.
resolution  the pixel density of the display in dots per inch (DPI). Defaults to 100 DPI.

OGLFT::Filled::Filled FT_Face    face,
float    point_size = 12,
FT_UInt    resolution = 100
 

Parameters:
face  open FreeType FT_Face.
point_size  the initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12.
resolution  the pixel density of the display in dots per inch (DPI). Defaults to 100 DPI.

OGLFT::Filled::~Filled void    [virtual]
 

The destructor deletes the GLU tessellation object allocated in in the constructor.


Member Function Documentation

VertexInfoList& OGLFT::Filled::extraVertices void    [inline]
 

Returns:
the list of extra vertices created by the GLU tessellation combine callback.

void OGLFT::Filled::renderGlyph FT_Face    face,
FT_UInt    glyph_index
[protected, virtual]
 

Each style implements its own glyph rendering routine.

Parameters:
face  the FT_Face containing the glyph.
glyph_index  the index of the glyph in face.

Implements OGLFT::Face.


Member Data Documentation

GLfloat OGLFT::Filled::depth_offset_ [protected]
 

Offset the glyph in the Z direction. Solely for the Solid subclass. Until I can figure out how to shift the glyph outside the context of this class, I guess this has got to stay (but it is redundant to extrusion_.depth_)


The documentation for this class was generated from the following files:
Generated on Wed Oct 1 10:39:03 2003 for OGLFT by doxygen1.2.18