#include <glfx.h>
Inheritance diagram for GLFX::IFont:
Public Types | |
enum | { SINGLE_LINE, MULTI_LINE, CHAR_WRAP, WORD_WRAP } |
Public Member Functions | |
virtual GLuint | GetTexture ()=0 |
virtual void | DrawChar (float x, float y, float z, int c, float *bounds)=0 |
virtual void | DrawString (float x, float y, float z, const char *strBegin, const char *strEnd, unsigned long mode, float lineWidth, float *bounds)=0 |
virtual unsigned long | GetGlyphHeight ()=0 |
virtual unsigned long | GetGlyphBaseLine ()=0 |
virtual float | ComputeStringWidth (const char *strBegin, const char *strEnd, unsigned long mode, float lineWidth)=0 |
virtual unsigned long | ComputeStringLineCount (const char *strBegin, const char *strEnd, unsigned long mode, float lineWidth)=0 |
virtual void | SetTabSize (unsigned long horizontal)=0 |
anonymous enum |
String rendering modes.
virtual GLuint GLFX::IFont::GetTexture | ( | ) | [pure virtual] |
Returns OpenGL texture id.
virtual void GLFX::IFont::DrawChar | ( | float | x, | |
float | y, | |||
float | z, | |||
int | c, | |||
float * | bounds | |||
) | [pure virtual] |
Draws a single character.
x | x-coord of the character | |
y | y-coord of the character | |
z | z-coord of the character | |
c | character code, currently only 7-bit ASCII values are acceppted (other may produce unexpected results) | |
bounds | a array of 4 values (minX, minY, maxX, maxY) defining the bounding box, where drawing is allowed; ignored if 0 |
virtual void GLFX::IFont::DrawString | ( | float | x, | |
float | y, | |||
float | z, | |||
const char * | strBegin, | |||
const char * | strEnd, | |||
unsigned long | mode, | |||
float | lineWidth, | |||
float * | bounds | |||
) | [pure virtual] |
Draws multiples characters in the given mode.
x | x-coord of the begin of the string | |
y | y-coord of the begin of the string | |
z | z-coord of the begin of the string | |
strBegin | first character of the string | |
strEnd | last character of the string; specifying 0 causes strBegin to be treated as null-terminated string | |
mode | text rendering mode, may be one of SINGLE_LINE, MULTI_LINE, CHAR_WRAP or WORD_WRAP | |
lineWidth | maximum width of string, if 0 no such width exists | |
bounds | a array of 4 values (minX, minY, maxX, maxY) defining the bounding box, where drawing is allowed; ignored if 0 |
virtual unsigned long GLFX::IFont::GetGlyphHeight | ( | ) | [pure virtual] |
Returns the height of this font.
virtual unsigned long GLFX::IFont::GetGlyphBaseLine | ( | ) | [pure virtual] |
Returns the distance from glyph image top to the font base line.
virtual float GLFX::IFont::ComputeStringWidth | ( | const char * | strBegin, | |
const char * | strEnd, | |||
unsigned long | mode, | |||
float | lineWidth | |||
) | [pure virtual] |
Returns the width of a string.
strBegin | first character of the string | |
strEnd | last character of the string; specifying 0 causes strBegin to be treated as null-terminated string | |
mode | text rendering mode, may be one of SINGLE_LINE, MULTI_LINE, CHAR_WRAP or WORD_WRAP | |
lineWidth | maximum width of string, if 0 no such width exists |
virtual unsigned long GLFX::IFont::ComputeStringLineCount | ( | const char * | strBegin, | |
const char * | strEnd, | |||
unsigned long | mode, | |||
float | lineWidth | |||
) | [pure virtual] |
Returns number of lines in a string.
strBegin | first character of the string | |
strEnd | last character of the string; specifying 0 causes strBegin to be treated as null-terminated string | |
mode | text rendering mode, may be one of SINGLE_LINE, MULTI_LINE, CHAR_WRAP or WORD_WRAP | |
lineWidth | maximum width of string, if 0 no such width exists |
virtual void GLFX::IFont::SetTabSize | ( | unsigned long | horizontal | ) | [pure virtual] |
Sets horizontal tab size.
horizontal | horizontal tab size, default value is 4 |