libmoldeo (Moldeo 1.0 Core)
1.0
libmoldeo es el conjunto de objetos y funciones, que permiten ejecutar las operaciones básicas de la plataforma Moldeo, y que compone su núcleo.
|
This is the base class of the polygonal styles: outline, filled and solid. Más...
#include <moOGLFT.h>
Clases | |
struct | VertexInfo |
Métodos públicos | |
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 char *s) |
Métodos públicos heredados desde OGLFT::Face | |
Face (const char *filename, float point_size=12, FT_UInt resolution=100) | |
Face (FT_Face face, float point_size=12, FT_UInt resolution=100) | |
virtual | ~Face (void) |
bool | isValid (void) const |
bool | addAuxiliaryFace (const char *filename) |
bool | addAuxiliaryFace (FT_Face face) |
void | setCompileMode (enum GlyphCompileMode compile_mode) |
enum GlyphCompileMode | compileMode (void) const |
void | setPointSize (float point_size) |
float | pointSize (void) |
void | setResolution (FT_UInt resolution) |
FT_UInt | resolution (void) |
void | setAdvance (bool advance) |
bool | advance (void) const |
void | setForegroundColor (GLfloat red=0.0, GLfloat green=0.0, GLfloat blue=0.0, GLfloat alpha=1.0) |
void | setForegroundColor (const GLfloat foreground_color[4]) |
GLfloat | foregroundRed (void) const |
GLfloat | foregroundGreen (void) const |
GLfloat | foregroundBlue (void) const |
GLfloat | foregroundAlpha (void) const |
void | setBackgroundColor (GLfloat red=1.0, GLfloat green=1.0, GLfloat blue=1.0, GLfloat alpha=0.0) |
void | setBackgroundColor (const GLfloat background_color[4]) |
GLfloat | backgroundRed (void) const |
GLfloat | backgroundGreen (void) const |
GLfloat | backgroundBlue (void) const |
GLfloat | backgroundAlpha (void) const |
void | setCharacterRotationReference (unsigned char c) |
void | setStringRotation (GLfloat string_rotation) |
GLfloat | stringRotation (void) const |
void | setHorizontalJustification (enum HorizontalJustification horizontal_justification) |
enum HorizontalJustification | horizontalJustification (void) const |
void | setVerticalJustification (enum VerticalJustification vertical_justification) |
enum VerticalJustification | verticaljustification (void) const |
void | setCharacterDisplayLists (const DisplayLists &character_display_lists) |
DisplayLists & | characterDisplayLists (void) |
virtual BBox | measureRaw (const char *s) |
GLuint | compile (const char *s) |
GLuint | compile (unsigned char c) |
void | draw (const char *s) |
void | draw (unsigned char c) |
void | draw (GLfloat x, GLfloat y, unsigned char c) |
void | draw (GLfloat x, GLfloat y, GLfloat z, unsigned char c) |
void | draw (GLfloat x, GLfloat y, const char *s) |
void | draw (GLfloat x, GLfloat y, GLfloat z, const char *s) |
int | ascender (void) |
int | descender (void) |
Tipos protegidos | |
typedef std::list< VertexInfo * > | VertexInfoList |
Normally, we will consider a list of vertices. Más... | |
typedef VertexInfoList::const_iterator | VILCI |
A convenience definition of the iterator over the list of vertices. Más... | |
typedef VertexInfoList::iterator | VILI |
A convenience definition of the iterator over the list of vertices. Más... | |
Tipos protegidos heredados desde OGLFT::Face | |
typedef std::map< FT_UInt, GLuint > | GlyphDLists |
Type of the cache of defined glyph to display list mapping. Más... | |
typedef GlyphDLists::const_iterator | GDLCI |
typedef GlyphDLists::iterator | GDLI |
Métodos protegidos | |
void | clearCaches (void) |
Métodos protegidos heredados desde OGLFT::Face | |
virtual void | renderGlyph (FT_Face face, FT_UInt glyph_index)=0 |
Atributos protegidos | |
struct { | |
bool active_ | |
GLfloat x_ | |
GLfloat y_ | |
GLfloat z_ | |
} | character_rotation_ |
Angle of rotation of characters relative to text orientation. Más... | |
unsigned int | tessellation_steps_ |
double | delta_ |
double | delta2_ |
double | delta3_ |
double | vector_scale_ |
FT_Outline_Funcs | interface_ |
Callbacks for FreeType glyph decomposition into outlines. Más... | |
VertexInfo | last_vertex_ |
VertexInfoList | vertices_ |
bool | contour_open_ |
ColorTess * | color_tess_ |
TextureTess * | texture_tess_ |
Atributos protegidos heredados desde OGLFT::Face | |
std::vector< FaceData > | faces_ |
bool | valid_ |
Did a font load OK? Más... | |
enum GlyphCompileMode | compile_mode_ |
Glyph display list creation mode. Más... | |
float | point_size_ |
Nominal point size. Más... | |
FT_UInt | resolution_ |
Display resolution in pixels per inch. Más... | |
bool | advance_ |
Does rendering text affect the MODELVIEW matrix? Más... | |
GLfloat | foreground_color_ [4] |
GLfloat | background_color_ [4] |
Background color (what modes would use this?) Más... | |
enum HorizontalJustification | horizontal_justification_ |
PHIGS-like horizontal positioning of text. Más... | |
enum VerticalJustification | vertical_justification_ |
PHIGS-like vertical positioning of text. Más... | |
GLfloat | string_rotation_ |
Rotate an entire string in the Z plane. Más... | |
FT_UInt | rotation_reference_glyph_ |
FT_Face | rotation_reference_face_ |
The rotation reference character could be in any face. Más... | |
GLfloat | rotation_offset_y_ |
GlyphDLists | glyph_dlists_ |
Cache of defined glyph display lists. Más... | |
DisplayLists | character_display_lists_ |
Atributos protegidos estáticos | |
static const unsigned int | DEFAULT_TESSELLATION_STEPS = 4 |
Otros miembros heredados | |
Tipos públicos heredados desde OGLFT::Face | |
enum | HorizontalJustification { LEFT, ORIGIN, CENTER, RIGHT } |
enum | VerticalJustification { BOTTOM, BASELINE, MIDDLE, TOP } |
enum | GlyphCompileMode { COMPILE, IMMEDIATE } |
This is the base class of the polygonal styles: outline, filled and solid.
In the polygonal styles, the detailed geometric outlines of the glyphs are extracted from the font file and rendered as polygons.
|
protected |
|
protected |
|
protected |
OGLFT::Polygonal::Polygonal | ( | const char * | filename, |
float | point_size = 12 , |
||
FT_UInt | resolution = 100 |
||
) |
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. |
Definición en la línea 1958 del archivo moOGLFT.cpp.
OGLFT::Polygonal::Polygonal | ( | FT_Face | face, |
float | point_size = 12 , |
||
FT_UInt | resolution = 100 |
||
) |
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. |
Definición en la línea 1966 del archivo moOGLFT.cpp.
|
virtual |
The Polygonal destructor doesn't do anything in particular.
Definición en la línea 2007 del archivo moOGLFT.cpp.
|
inline |
|
inline |
|
inlinevirtual |
Implementa OGLFT::Face.
|
protectedvirtual |
The different styles have different caching needs (well, really only the texture style currently has more than the display list cache).
Implementa OGLFT::Face.
Definición en la línea 2227 del archivo moOGLFT.cpp.
|
inline |
|
virtual |
Implementa OGLFT::Face.
Definición en la línea 2127 del archivo moOGLFT.cpp.
|
virtual |
Implement measuring a character in a polygonal face.
c | the (latin1) character to measure |
Implementa OGLFT::Face.
Definición en la línea 2137 del archivo moOGLFT.cpp.
Measure a string of characters. Note: currently, this merely calls Face's measure routine.
s | string of (latin1) characters to measure |
Reimplementado de OGLFT::Face.
void OGLFT::Polygonal::setCharacterRotationX | ( | GLfloat | character_rotation_x | ) |
Set the individual character rotation in the X direction.
character_rotation_x | angle in degrees of the X rotation. |
Definición en la línea 2050 del archivo moOGLFT.cpp.
void OGLFT::Polygonal::setCharacterRotationY | ( | GLfloat | character_rotation_y | ) |
Set the individual character rotation in the Y direction.
character_rotation_y | angle in degrees of the Y rotation. |
Definición en la línea 2065 del archivo moOGLFT.cpp.
|
virtual |
Set the individual character rotation in the Z direction.
character_rotation_z | angle in degrees of the Z rotation. |
Implementa OGLFT::Face.
Definición en la línea 2080 del archivo moOGLFT.cpp.
void OGLFT::Polygonal::setColorTess | ( | ColorTess * | color_tess | ) |
Set an optional color tesselation object. Each tesselated vertex is passed to this object, which returns a color for that position in space.
color_tess | the color tesselation object. |
Definición en la línea 2015 del archivo moOGLFT.cpp.
void OGLFT::Polygonal::setTessellationSteps | ( | unsigned int | tessellation_steps | ) |
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.
tessellation_steps | the number of steps to tessellate each curved segment of a glyph outline. |
Definición en la línea 2034 del archivo moOGLFT.cpp.
void OGLFT::Polygonal::setTextureTess | ( | TextureTess * | texture_tess | ) |
Set an optional texture coordinate tesselation object. Each tessellated vertex is passed to this object, which returns texture coordinates for that position in space.
texture_tess | the texture coordinate tesselation object. |
Definición en la línea 2025 del archivo moOGLFT.cpp.
|
inline |
|
inline |
struct { ... } OGLFT::Polygonal::character_rotation_ |
Angle of rotation of characters relative to text orientation.
|
protected |
|
protected |
|
staticprotected |
|
protected |
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
|
protected |
|
protected |
|
protected |
|
protected |
The user can provide a TextureTess object which computes texture coordinates for each tesselated vertex.
|
protected |
|
protected |