#include <Text.h>
Collaboration diagram for gedi::Text:
Public Member Functions | |
Text () | |
Text (gedi::Int32 iType) | |
void | Init () |
void | Render () |
gedi::Int32 | GetWidth (void) |
gedi::Int32 | GetHeight (void) |
void | SetFont (gedi::FontType iType) |
void | SetText (LPSTR lpzText) |
void | SetText (gedi::Int32 iNumber) |
void | SetText (gedi::Real32 fReal, LPSTR lpzFormat) |
void | SetText (gedi::Vector2D kVector) |
void | SetPosition (gedi::Int32 iX, gedi::Int32 iY) |
Static Public Member Functions | |
static void | SetPath (LPSTR lpzPath) |
static gedi::Int32 | InstallFont (gedi::FontABO &rkFontABO) |
Protected Member Functions | |
virtual gedi::Int32 | Map (gedi::UInt8 iChar) |
Static Protected Attributes | |
static FontABO | m_akFontABO [MAX_FONTS] |
gedi::Text::Text | ( | ) |
Constructor, default font is gedi::FontCourierSmall.
gedi::Text::Text | ( | gedi::Int32 | iType | ) |
void gedi::Text::Init | ( | ) |
Initialize the text with the font. This is automatically done on first Render attempt. If you invoke GetWidth, etc., on Text before Render, you must first invoke SetPath followed by Init.
void gedi::Text::Render | ( | ) |
Renders the text on the display.
gedi::Int32 gedi::Text::GetWidth | ( | void | ) |
Gets the width of the current text string setting.
gedi::Int32 gedi::Text::GetHeight | ( | void | ) |
Gets the one-line height of the font.
void gedi::Text::SetFont | ( | gedi::FontType | iType | ) | [inline] |
void gedi::Text::SetText | ( | LPSTR | lpzText | ) | [inline] |
Set the text string, persists until set to another string.
lpzText | String, copied by the method. |
void gedi::Text::SetText | ( | gedi::Int32 | iNumber | ) |
Set the text string as an integer.
iNumber | Number to convert to a string. |
void gedi::Text::SetText | ( | gedi::Real32 | fReal, | |
LPSTR | lpzFormat | |||
) |
Set the text string as a real.
fReal | Number to convert to a string *. | |
lpzFormat | Format specifications, a sprintf-type float spec. |
void gedi::Text::SetText | ( | gedi::Vector2D | kVector | ) |
Set the text string as a vector.
kVector | Vector. |
void gedi::Text::SetPosition | ( | gedi::Int32 | iX, | |
gedi::Int32 | iY | |||
) | [inline] |
Set the upper left position of the string.
iX | X coordinate. | |
iY | Y coordinate. |
static void gedi::Text::SetPath | ( | LPSTR | lpzPath | ) | [inline, static] |
Set font directory path.
lpzPath | Directory path of fonts. |
gedi::Int32 gedi::Text::InstallFont | ( | gedi::FontABO & | rkFontABO | ) | [static] |
Installs a new font.
rkFontABO | Font to install. |
gedi::Int32 gedi::Text::Map | ( | gedi::UInt8 | iChar | ) | [protected, virtual] |
Maps a character to an animation in the font bitmap.
iChar | Character. |
gedi::FontABO gedi::Text::m_akFontABO [static, protected] |
Font table