|
Public Member Functions |
| | ZFont () |
| | Default Constructor.
|
| | ZFont (std::string filename, int size) |
| | Constructor that opens a font with a certain size.
|
| virtual | ~ZFont () |
| | Destructor, frees memory.
|
| void | Open (std::string filename, int size) |
| | Opens a font with a certain size.
|
| void | Release () |
| | Release font.
|
| void | DrawText (std::string text, ZImage &image) const |
| | Draws a std::string in a color to a ZImage.
|
| void | DrawShadedText (std::string text, ZImage &image) const |
| | Draws a std::string with a colored background to a ZImage.
|
| void | SetColor (Uint8 r, Uint8 g, Uint8 b, Uint8 a=255) |
| | Set Text rColor.
|
| void | SetBGColor (Uint8 r, Uint8 g, Uint8 b) |
| | Set Background rColor.
|
| void | SetStyle (bool bold, bool italic, bool underline) |
| | Set display format.
|
| void | Resize (int size) |
| | Resize Font.
|
| bool | IsLoaded () const |
| | Check if file is loaded.
|
| bool | IsBold () const |
| | Get Bold Setting.
|
| bool | IsItalic () const |
| | Get Italic Setting.
|
| bool | IsUnderlined () const |
| | Get Underlined Setting.
|
| int | Height () const |
| | Get Height of Font.
|
| int | LineSkip () const |
| | Get Line Skip for Font.
|
| int | StringWidth (std::string text) const |
| | Get String Width.
|
| int | StringHeight (std::string text) const |
| | Get String Height.
|
Protected Attributes |
|
ZEngine * | rEngine |
| | Pointer to ZEngine Object.
|
|
TTF_Font * | rFont |
| | Pointer to font data.
|
|
std::string | rFilename |
| | Filename, for resizing.
|
|
SDL_Color | rColor |
| | SDL_Color for current text color.
|
|
SDL_Color | rBGColor |
| | SDL_Color for background color to be used in shaded draws.
|