OpenGL font.
More...
|
tResult | Create (const cGLCanvas *pCanvas, const char *strFilename, tInt nHeight, tStyle eFontStyle) |
| Creates a font based on the given parameters. More...
|
|
tResult | CleanUp () |
| Clean up the font. More...
|
|
void | Print (tInt x, tInt y, tFloat64 fAngle, const char *strFormat, va_list ArgList) |
| Print a string onto the screen. More...
|
|
void | Print (tFloat32 x, tFloat32 y, tFloat64 fAngle, const char *strFormat, va_list ArgList) |
| Print a string onto the screen. More...
|
|
tVoid | FlipTextHorizontally (tBool bOpposedYAxis) |
| Set the text direction with or opposed the x-axis direction. More...
|
|
tVoid | TextScaleWithCoordinateSystem (tBool bScaleWithCoordinateSystem) |
| Set the text to scale with the coordinatesystem. More...
|
|
tVoid | TextRotateWithCoordinateSystem (tBool bRotateWithCoordinateSystem) |
| Set the text to rotate with the coordinatesystem. More...
|
|
tVoid | TextBaselineOnTop (tBool bTextBaselineOnTop) |
| Set the text baseline on the top of the text. More...
|
|
virtual | ~IFont () |
| virtual destructor to ensure proper cleanup.
|
|
virtual tResult | Release ()=0 |
| Releases the font. More...
|
|
virtual tInt | GetHeight () const =0 |
| This function returns the height of the font in point. More...
|
|
virtual tBool | MeasureText (const tChar *str, tInt &nWidth, tInt &nHeight) const =0 |
| The methods returns the measurement of the text in nWidth and nHeight. More...
|
|
|
tResult | BuildDisplayList (char ch, tStyle eFontStyle) |
| Creates a display list for the given character. More...
|
|
void | PrintImpl (tUInt32 ui32Flags, tFloat32 x, tFloat32 y, tFloat64 fAngle, const char *strFormat, va_list ArgList) |
| Internal print implementation. More...
|
|
|
static constexpr tInt | m_nTextureScale = 8 |
| Super sampling of internal texture.
|
|
OpenGL font.
Definition at line 43 of file glfont.h.
◆ BuildDisplayList()
tResult BuildDisplayList |
( |
char |
ch, |
|
|
tStyle |
eFontStyle |
|
) |
| |
|
protected |
Creates a display list for the given character.
- Parameters
-
ch | [in] Character for which the display list should be generated. |
eFontStyle | [in] Fontstyle. |
- Returns
- Standard result code
◆ CleanUp()
Clean up the font.
- Returns
- Standard result code
◆ Create()
tResult Create |
( |
const cGLCanvas * |
pCanvas, |
|
|
const char * |
strFilename, |
|
|
tInt |
nHeight, |
|
|
tStyle |
eFontStyle |
|
) |
| |
Creates a font based on the given parameters.
- Parameters
-
pCanvas | [in] The drawing canvas. |
strFilename | [in] Filename of font. |
nHeight | [in] Desired height for the font. |
eFontStyle | [in] Fontstyle. |
- Returns
- Standard result code
◆ FlipTextHorizontally()
tVoid FlipTextHorizontally |
( |
tBool |
bOpposedYAxis | ) |
|
Set the text direction with or opposed the x-axis direction.
- Parameters
-
[in] | bOpposedYAxis | tFalse: with the x-axis direction tTrue: opposed the x-axis direction |
- Returns
- void
◆ Initialize()
static tResult Initialize |
( |
| ) |
|
|
static |
Initialize the font.
- Returns
- Standard result code
◆ Print() [1/2]
void Print |
( |
tFloat32 |
x, |
|
|
tFloat32 |
y, |
|
|
tFloat64 |
fAngle, |
|
|
const char * |
strFormat, |
|
|
va_list |
ArgList |
|
) |
| |
Print a string onto the screen.
- Parameters
-
x | [in] Drawing position x coordinate (floating-point). |
y | [in] Drawing position y coordinate (floating-point). |
fAngle | [in] Drawing angle. |
strFormat | [in] Formatted string. |
ArgList | [in] Arguments for formatted string. |
◆ Print() [2/2]
void Print |
( |
tInt |
x, |
|
|
tInt |
y, |
|
|
tFloat64 |
fAngle, |
|
|
const char * |
strFormat, |
|
|
va_list |
ArgList |
|
) |
| |
Print a string onto the screen.
- Parameters
-
x | [in] Drawing position x coordinate (integer). |
y | [in] Drawing position y coordinate (integer). |
fAngle | [in] Drawing angle. |
strFormat | [in] Formatted string. |
ArgList | [in] Arguments for formatted string. |
◆ PrintImpl()
void PrintImpl |
( |
tUInt32 |
ui32Flags, |
|
|
tFloat32 |
x, |
|
|
tFloat32 |
y, |
|
|
tFloat64 |
fAngle, |
|
|
const char * |
strFormat, |
|
|
va_list |
ArgList |
|
) |
| |
|
protected |
Internal print implementation.
- Parameters
-
ui32Flags | [in] Flags. |
x | [in] Drawing position x coordinate (floating-point). |
y | [in] Drawing position y coordinate (floating-point). |
fAngle | [in] Drawing angle. |
strFormat | [in] Formatted string. |
ArgList | [in] Arguments for formatted string. |
◆ TextBaselineOnTop()
tVoid TextBaselineOnTop |
( |
tBool |
bTextBaselineOnTop | ) |
|
Set the text baseline on the top of the text.
- Parameters
-
[in] | bTextBaselineOnTop | if true = top otherwise false = bottom |
- Returns
- void
◆ TextRotateWithCoordinateSystem()
tVoid TextRotateWithCoordinateSystem |
( |
tBool |
bRotateWithCoordinateSystem | ) |
|
Set the text to rotate with the coordinatesystem.
- Parameters
-
[in] | bRotateWithCoordinateSystem | the value to be set |
- Returns
- void
◆ TextScaleWithCoordinateSystem()
tVoid TextScaleWithCoordinateSystem |
( |
tBool |
bScaleWithCoordinateSystem | ) |
|
Set the text to scale with the coordinatesystem.
- Parameters
-
[in] | bScaleWithCoordinateSystem | the value to be set |
- Returns
- void
◆ Uninitialize()
static tResult Uninitialize |
( |
| ) |
|
|
static |
Uninitialize the font.
- Returns
- Standard result code