Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members
OGLFT::Outline Class Reference
Render text as a polygon outline.
More...
#include <OGLFT.h>
Inheritance diagram for OGLFT::Outline:
List of all members.
|
Public Methods |
| Outline (const char *filename, float point_size=12, FT_UInt resolution=100) |
| Outline (FT_Face face, float point_size=12, FT_UInt resolution=100) |
| ~Outline (void) |
Detailed Description
Render text as a polygon outline.
Text is drawn as an outline of each glyph. The contours are extracted from the font file through FreeType. FreeType is used to scale the contours to a given size. Usually the outline is drawn in the foreground color, however, you can specify a ColorTess object to provide a color for 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 outlines are drawn as a polygon, they are subject to the MODELVIEW transformation. 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::Outline::Outline |
( |
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::Outline::Outline |
( |
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::Outline::~Outline |
( |
void |
|
) |
|
|
|
The destructor doesn't do anything in particular. |
The documentation for this class was generated from the following files:
Generated on Wed Oct 1 10:39:03 2003 for OGLFT by
1.2.18