#include <OGLFT.h>
Inheritance diagram for OGLFT::Polygonal:
Public Methods | |
Polygonal (const char *filename, float point_size=12, FT_UInt resolution=100) | |
Polygonal (FT_Face face, float point_size=12, FT_UInt resolution=100) | |
virtual | ~Polygonal (void) |
void | setTessellationSteps (unsigned int tessellation_steps) |
unsigned int | tessellationSteps (void) const |
void | setCharacterRotationX (GLfloat character_rotation_x) |
void | setCharacterRotationY (GLfloat character_rotation_y) |
void | setCharacterRotationZ (GLfloat character_rotation_z) |
GLfloat | characterRotationX (void) const |
GLfloat | characterRotationY (void) const |
GLfloat | characterRotationZ (void) const |
void | setColorTess (ColorTess *color_tess) |
ColorTess * | colorTess (void) const |
void | setTextureTess (TextureTess *texture_tess) |
TextureTess * | textureTess (void) const |
double | height (void) const |
BBox | measure (unsigned char c) |
BBox | measure (const QChar c) |
BBox | measure (const char *s) |
BBox | measure (const QString &format, double number) |
Protected Types | |
typedef std::list< VertexInfo * > | VertexInfoList |
Normally, we will consider a list of vertices. | |
typedef VertexInfoList::const_iterator | VILCI |
A convenience definition of the iterator over the list of vertices. | |
typedef VertexInfoList::iterator | VILI |
A convenience definition of the iterator over the list of vertices. | |
Protected Methods | |
void | clearCaches (void) |
Protected Attributes | |
struct { | |
} | character_rotation_ |
Angle of rotation of characters relative to text orientation. | |
unsigned int | tessellation_steps_ |
double | delta_ |
double | delta2_ |
double | delta3_ |
double | vector_scale_ |
FT_Outline_Funcs | interface_ |
Callbacks for FreeType glyph decomposition into outlines. | |
VertexInfo | last_vertex_ |
VertexInfoList | vertices_ |
bool | contour_open_ |
ColorTess * | color_tess_ |
TextureTess * | texture_tess_ |
Static Protected Attributes | |
const unsigned int | DEFAULT_TESSELLATION_STEPS = 4 |
In the polygonal styles, the detailed geometric outlines of the glyphs are extracted from the font file and rendered as polygons.
|
|
|
|
|
The Polygonal destructor doesn't do anything in particular. |
|
|
|
|
|
Implements OGLFT::Face. |
|
The different styles have different caching needs (well, really only the texture style currently has more than the display list cache). Implements OGLFT::Face. |
|
|
|
Implements OGLFT::Face. |
|
Implement measuring a formatted number
Reimplemented from OGLFT::Face. |
|
Measure a string of characters. Note: currently, this merely calls Face's measure routine.
Reimplemented from OGLFT::Face. |
|
Implement measuring a character in a polygonal face.
Implements OGLFT::Face. |
|
Implement measuring a character in a polygonal face.
Implements OGLFT::Face. |
|
Set the individual character rotation in the X direction.
|
|
Set the individual character rotation in the Y direction.
|
|
Set the individual character rotation in the Z direction.
Implements OGLFT::Face. |
|
Set an optional color tesselation object. Each tesselated vertex is passed to this object, which returns a color for that position in space.
|
|
TrueType and Type1 files describe the boundaries of glyphs with quadratic and cubic curves, respectively. Since OpenGL can only really draw straight lines, these curves have to be tessellated. The number of steps used is fixed for all glyphs in the face, but can be changed through this method. Other notes: This value is only applicable for Outline, Filled and Solid styles. Changing this value invalidates any cached display lists for glyphs in this face.
|
|
Set an optional texture coordinate tesselation object. Each tessellated vertex is passed to this object, which returns texture coordinates for that position in space.
|
|
|
|
|
|
The user can provide a ColorTess object which computes a color for each tesselated vertex. |
|
As GLU tessellation proceeds, new contours open with every call to moveTo. |
|
Default number of steps to break TrueType and Type1 arcs into. (Note: this looks good to me, anyway) |
|
When curves are tessellated, we use the forward difference algorithm from Foley and van Dam for parametric curves (pg. 511 of 2nd Ed. in C). So, the step size, delta, is in the parametric variable which is always on the interval [0,1]. Therefore, delta = 1/tessellation_steps |
|
When curves are tessellated, we use the forward difference algorithm from Foley and van Dam for parametric curves (pg. 511 of 2nd Ed. in C). So, the step size, delta, is in the parametric variable which is always on the interval [0,1]. Therefore, delta = 1/tessellation_steps |
|
When curves are tessellated, we use the forward difference algorithm from Foley and van Dam for parametric curves (pg. 511 of 2nd Ed. in C). So, the step size, delta, is in the parametric variable which is always on the interval [0,1]. Therefore, delta = 1/tessellation_steps |
|
Buffers the last control point as the outline of a glyph is decomposed. |
|
The tessellation of curves is pretty crude; regardless of length, use the same number of increments (and as near as I can tell, this is more than sufficient unless the glyph takes up the whole screen). |
|
The user can provide a TextureTess object which computes texture coordinates for each tesselated vertex. |
|
For vector rendition modes, FreeType is allowed to generate the lines and arcs at the original face definition resolution. To get to the proper glyph size, the vertices are scaled before they're passed to the GLU tessellation routines. |
|
As curves are decomposed out of the glyph, their vertices are passed along to the GLU tessellation functions. These vertices have to hang around until gluTessContourEnd is called. |