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.
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Amigas 'defines' Grupos Páginas
Referencia de la Clase OGLFT::GrayscaleTexture

Render text as texture mapped grayscale quads. Más...

#include <moOGLFT.h>

Diagrama de herencias de OGLFT::GrayscaleTexture
OGLFT::Texture OGLFT::Face

Métodos públicos

 GrayscaleTexture (const char *filename, float point_size=12, FT_UInt resolution=100)
 
 GrayscaleTexture (FT_Face face, float point_size=12, FT_UInt resolution=100)
 
 ~GrayscaleTexture (void)
 
- Métodos públicos heredados desde OGLFT::Texture
 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)
 

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 }
 
- Tipos protegidos heredados desde OGLFT::Texture
typedef std::map< FT_UInt,
TextureInfo
GlyphTexObjs
 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 heredados desde OGLFT::Texture
unsigned int nearestPowerCeil (unsigned int a)
 
- Atributos protegidos heredados desde OGLFT::Texture
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< 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_
 

Descripción detallada

Render text as texture mapped grayscale quads.

texture_grayscale_class.png

This style is similar to the Grayscale raster style, except instead of using glDrawPixels to draw the raster image, the image is used as a texture map on a quad. If drawing is confined to the Z plane, then you will see no difference between this style and Grayscale. However, because the quad is a 3D object, it can be transformed by the usual modeling operations; so, texture mapped glyphs can be rotated in the X and Y directions as well as Z direction. Also, if the viewing (or modeling) transformation has a non-unity scale or shear, the glyphs will also be scaled or sheared (unlike the raster styles). Also, there is no problem with clipping glyphs which lie off the screen; texture mapped quads are properly clipped to the screen boundary.

If this is not convincing enough, the performance of texture mapped glyphs is generally as good as or better than the equivalent raster style (especially with hardware texture acceleration). However, they do consume more memory space.

Note: you must call

glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );

before drawing in order for textured glyphs to be rendered properly.

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

Documentación del constructor y destructor

OGLFT::GrayscaleTexture::GrayscaleTexture ( 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 3639 del archivo moOGLFT.cpp.

OGLFT::GrayscaleTexture::GrayscaleTexture ( 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 3644 del archivo moOGLFT.cpp.

OGLFT::GrayscaleTexture::~GrayscaleTexture ( void  )

The grayscale texture destructor doesn't really do anything.

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


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