#include <OGLFT.h>
Inheritance diagram for OGLFT::Texture::
Public Methods | |
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 QChar c) |
BBox | measure (const char *s) |
BBox | measure (const QString &format, double number) |
Protected Types | |
typedef std::map< FT_UInt, TextureInfo > | GlyphTexObjs |
Type of the cache of defined glyph to texture objects mapping. | |
typedef GlyphTexObjs::const_iterator | GTOCI |
A convenience definition of the iterator over the glyph to texture object map. | |
typedef GlyphTexObjs::iterator | GTOI |
A convenience definition of the iterator over the glyph to texture object map. | |
Protected Methods | |
unsigned int | nearestPowerCeil (unsigned int a) |
virtual void | bindTexture (FT_Face face, FT_UInt glyph_index)=0 |
Protected Attributes | |
struct { | |
bool active_ | |
GLfloat x_ | |
GLfloat y_ | |
GLfloat z_ | |
} | character_rotation_ |
Angle of rotation of characters relative to text orientation. | |
GlyphTexObjs | glyph_texobjs_ |
Cache of defined glyph texture objects. |
|
|
|
|
|
The texture destructor doesn't really do anything. |
|
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.
|
|
|
|
|
|
Reimplemented from OGLFT::Face. |
|
Reimplemented from 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 texture face.
Reimplemented from OGLFT::Face. |
|
Implement measuring a character in a texture face.
Reimplemented from OGLFT::Face. |
|
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.
|
|
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.
Reimplemented from OGLFT::Face. |
|
Is character rotation non-zero? (faster than checking all the other values.).
|
|
Angle of rotation in the X direction.
|
|
Angle of rotation in the Y direction.
|
|
Angle of rotation in the Z direction.
|