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.
Referencia de la Clase OGLFT::Textureabstract

This is the base class of the texture style. Más...

#include <moOGLFT.h>

Diagrama de herencias de OGLFT::Texture
Inheritance graph
Diagrama de colaboración para OGLFT::Texture:
Collaboration graph

Clases

struct  TextureInfo
 

Métodos públicos

 Texture (const char *filename, float point_size=12, FT_UInt resolution=100)
 
 Texture (FT_Face face, float point_size=12, FT_UInt resolution=100)
 
virtual ~ Texture (void)
 
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
 
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)
 
DisplayListscharacterDisplayLists (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::map< FT_UInt, TextureInfoGlyphTexObjs
 Type of the cache of defined glyph to texture objects mapping. Más...
 
typedef GlyphTexObjs::const_iterator GTOCI
 
typedef GlyphTexObjs::iterator GTOI
 
- 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

unsigned int nearestPowerCeil (unsigned int a)
 
virtual void bindTexture (FT_Face face, FT_UInt glyph_index)=0
 

Atributos protegidos

struct {
   bool   active_
 the other values.) Más...
 
   GLfloat   x_
 Angle of rotation in the X direction. Más...
 
   GLfloat   y_
 Angle of rotation in the Y direction. Más...
 
   GLfloat   z_
 Angle of rotation in the Z direction. Más...
 
character_rotation_
 Angle of rotation of characters relative to text orientation. Más...
 
GlyphTexObjs glyph_texobjs_
 Cache of defined glyph texture objects. Más...
 
- Atributos protegidos heredados desde OGLFT::Face
std::vector< FaceDatafaces_
 
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_
 

Métodos privados

void init (void)
 
void setCharSize (void)
 
void setRotationOffset (void)
 
GLuint compileGlyph (FT_Face face, FT_UInt glyph_index)
 
void renderGlyph (FT_Face face, FT_UInt glyph_index)
 
void clearCaches (void)
 

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 }
 

Descripción detallada

This is the base class of the texture style.

Definición en la línea 1950 del archivo moOGLFT.h.

Documentación de los 'Typedef' miembros de la clase

◆ GlyphTexObjs

typedef std::map< FT_UInt, TextureInfo > OGLFT::Texture::GlyphTexObjs
protected

Type of the cache of defined glyph to texture objects mapping.

Definición en la línea 1988 del archivo moOGLFT.h.

◆ GTOCI

typedef GlyphTexObjs::const_iterator OGLFT::Texture::GTOCI
protected

A convenience definition of the iterator over the glyph to texture object map.

Definición en la línea 1992 del archivo moOGLFT.h.

◆ GTOI

typedef GlyphTexObjs::iterator OGLFT::Texture::GTOI
protected

A convenience definition of the iterator over the glyph to texture object map.

Definición en la línea 1996 del archivo moOGLFT.h.

Documentación del constructor y destructor

◆ Texture() [1/2]

OGLFT::Texture::Texture ( const char *  filename,
float  point_size = 12,
FT_UInt  resolution = 100 
)
Parámetros
filenamethe filename which contains the font face.
point_sizethe initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12.
resolutionthe pixel density of the display in dots per inch (DPI). Defaults to 100 DPI.

Definición en la línea 3210 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:

◆ Texture() [2/2]

OGLFT::Texture::Texture ( FT_Face  face,
float  point_size = 12,
FT_UInt  resolution = 100 
)
Parámetros
faceopen FreeType FT_Face.
point_sizethe initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12.
resolutionthe pixel density of the display in dots per inch (DPI). Defaults to 100 DPI.

Definición en la línea 3218 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:

◆ ~ Texture()

virtual OGLFT::Texture::~ Texture ( void  )
virtual

The texture destructor doesn't really do anything.

Documentación de las funciones miembro

◆ bindTexture()

virtual void OGLFT::Texture::bindTexture ( FT_Face  face,
FT_UInt  glyph_index 
)
protectedpure virtual

This is all that distinguishes the various texture styles. Each subclass defines this method as appropriate. Once the texture is bound, it is rendered the same in all cases.

Parámetros
faceFT_Face containing the glyph to render.
glyph_indexindex of glyph in face.

Implementado en OGLFT::TranslucentTexture, OGLFT::GrayscaleTexture y OGLFT::MonochromeTexture.

Gráfico de llamadas a esta función:

◆ characterRotationX()

GLfloat OGLFT::Texture::characterRotationX ( void  ) const
inline
Devuelve
the character rotation in the X direction.

Definición en la línea 2046 del archivo moOGLFT.h.

◆ characterRotationY()

GLfloat OGLFT::Texture::characterRotationY ( void  ) const
inline
Devuelve
the character rotation in the Y direction.

Definición en la línea 2054 del archivo moOGLFT.h.

◆ characterRotationZ()

GLfloat OGLFT::Texture::characterRotationZ ( void  ) const
inlinevirtual
Devuelve
the character rotation in the Z direction.

Implementa OGLFT::Face.

Definición en la línea 2062 del archivo moOGLFT.h.

◆ clearCaches()

void OGLFT::Texture::clearCaches ( void  )
privatevirtual

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 3486 del archivo moOGLFT.cpp.

Gráfico de llamadas a esta función:

◆ compileGlyph()

GLuint OGLFT::Texture::compileGlyph ( FT_Face  face,
FT_UInt  glyph_index 
)
privatevirtual

Some styles, in particular the Texture, need specialized steps to compile a glyph into an OpenGL display list.

Parámetros
facethe FT_Face containing the glyph.
glyph_indexthe index of the glyph in face.
Devuelve
the display list of the compiled glyph.

Implementa OGLFT::Face.

Definición en la línea 3398 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:

◆ height()

double OGLFT::Texture::height ( void  ) const
virtual
Devuelve
the height (i.e., line spacing) at the current character size.

Implementa OGLFT::Face.

Definición en la línea 3352 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:
Gráfico de llamadas a esta función:

◆ init()

void OGLFT::Texture::init ( void  )
private

Definición en la línea 3224 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:
Gráfico de llamadas a esta función:

◆ measure() [1/2]

BBox OGLFT::Texture::measure ( unsigned char  c)
virtual

Implement measuring a character in a texture face.

Parámetros
cthe (latin1) character to measure
Devuelve
the bounding box of c.

Implementa OGLFT::Face.

Definición en la línea 3316 del archivo moOGLFT.cpp.

Gráfico de llamadas a esta función:

◆ measure() [2/2]

BBox OGLFT::Texture::measure ( const char *  s)
inlinevirtual

Measure a string of characters. Note: currently, this merely calls Face's measure routine.

Parámetros
sstring of (latin1) characters to measure
Devuelve
the bounding box of s.

Reimplementado de OGLFT::Face.

Definición en la línea 2092 del archivo moOGLFT.h.

Gráfico de llamadas para esta función:

◆ nearestPowerCeil()

unsigned int OGLFT::Texture::nearestPowerCeil ( unsigned int  a)
protected

OpenGL texture maps have to be a power of 2 in width and height (including apparently 1 = 2**0 ). This function returns the next higher power of 2 of the argument. If the argument is already a power of 2, you just get that back.

Parámetros
awidth or height of an image.
Devuelve
value of a rounded to nearest, higher power of 2.

Definición en la línea 3505 del archivo moOGLFT.cpp.

Gráfico de llamadas a esta función:

◆ renderGlyph()

void OGLFT::Texture::renderGlyph ( FT_Face  face,
FT_UInt  glyph_index 
)
privatevirtual

Each style implements its own glyph rendering routine.

Parámetros
facethe FT_Face containing the glyph.
glyph_indexthe index of the glyph in face.

Implementa OGLFT::Face.

Definición en la línea 3412 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:
Gráfico de llamadas a esta función:

◆ setCharacterRotationX()

void OGLFT::Texture::setCharacterRotationX ( GLfloat  character_rotation_x)

Set the individual character rotation in the X direction.

Parámetros
character_rotation_xangle in degrees of X rotation.

Definición en la línea 3243 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:

◆ setCharacterRotationY()

void OGLFT::Texture::setCharacterRotationY ( GLfloat  character_rotation_y)

Set the individual character rotation in the Y direction.

Parámetros
character_rotation_yangle in degrees of Y rotation.

Definición en la línea 3258 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:

◆ setCharacterRotationZ()

void OGLFT::Texture::setCharacterRotationZ ( GLfloat  character_rotation_z)
virtual

Set the individual character rotation in the Z direction.

Parámetros
character_rotation_zangle in degrees of Z rotation.

Implementa OGLFT::Face.

Definición en la línea 3273 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:

◆ setCharSize()

void OGLFT::Texture::setCharSize ( void  )
privatevirtual

There is a slight different between the way in which the polygonal and raster styles select the character size for FreeType to generate.

Implementa OGLFT::Face.

Definición en la línea 3288 del archivo moOGLFT.cpp.

Gráfico de llamadas para esta función:
Gráfico de llamadas a esta función:

◆ setRotationOffset()

void OGLFT::Texture::setRotationOffset ( void  )
privatevirtual

The polygonal and raster styles compute different values for the Z rotation offset. (It's in integer pixels for the raster styles and in floating point pixels for the polygonal styles.)

Implementa OGLFT::Face.

Definición en la línea 3304 del archivo moOGLFT.cpp.

Gráfico de llamadas a esta función:

Documentación de los datos miembro

◆ active_

bool OGLFT::Texture::active_

the other values.)

Is character rotation non-zero? (faster than checking all

Definición en la línea 1956 del archivo moOGLFT.h.

◆ character_rotation_

struct { ... } OGLFT::Texture::character_rotation_

Angle of rotation of characters relative to text orientation.

◆ glyph_texobjs_

GlyphTexObjs OGLFT::Texture::glyph_texobjs_
protected

Cache of defined glyph texture objects.

Definición en la línea 1999 del archivo moOGLFT.h.

◆ x_

GLfloat OGLFT::Texture::x_

Angle of rotation in the X direction.

Definición en la línea 1958 del archivo moOGLFT.h.

◆ y_

GLfloat OGLFT::Texture::y_

Angle of rotation in the Y direction.

Definición en la línea 1958 del archivo moOGLFT.h.

◆ z_

GLfloat OGLFT::Texture::z_

Angle of rotation in the Z direction.

Definición en la línea 1958 del archivo moOGLFT.h.


La documentación para esta clase fue generada a partir de los siguientes ficheros: