#include <ZE_ZFont.h>
Inherits ZE::ZObject.
| Public Methods | |
| ZFont () | |
| Default Constructor. | |
| ZFont (string filename, int size) | |
| Constructor that opens a font with a certain size. | |
| ~ZFont () | |
| Destructor, frees memory. | |
| void | Open (string filename, int size) | 
| Opens a font with a certain size. | |
| void | Release () | 
| Release font. | |
| void | DrawText (string text, ZImage &image) | 
| Draws a string in a color to a ZImage. | |
| void | DrawShadedText (string text, ZImage &image) | 
| Draws a string with a colored background to a ZImage. | |
| void | SetColor (Uint8 r, Uint8 g, Uint8 b) | 
| 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 () | 
| Check if file is loaded. | |
| bool | IsBold () | 
| Get Bold Setting. | |
| bool | IsItalic () | 
| Get Italic Setting. | |
| bool | IsUnderlined () | 
| Get Underlined Setting. | |
| int | Height () | 
| Get Height of Font. | |
| int | LineSkip () | 
| Get Line Skip for Font. | |
| int | StringWidth (string text) | 
| Get String Width. | |
| int | StringHeight (string text) | 
| Get String Height. | |
| Protected Attributes | |
| TTF_Font * | rFont | 
| Pointer to font data. | |
| 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. | |
| 
 | 
| Default Constructor, does nothing. | 
| 
 | ||||||||||||
| Constructor simply calls ZFont::Open() with same parameters. 
 | 
| 
 | 
| Destructor calls ZFont::Release(). | 
| 
 | ||||||||||||
| Opens a font given a filename and a point size. 
 | 
| 
 | 
| Release memory held by font. | 
| 
 | ||||||||||||
| Draw to a surface in specified color and associate that surface with a ZImage. 
 | 
| 
 | ||||||||||||
| Draw to a surface a string with a background of rBGColor and lettering in the normal color and associate that surface with a ZImage. 
 | 
| 
 | ||||||||||||||||
| Set rColor of Text Output. 
 | 
| 
 | ||||||||||||||||
| Set rColor of Background for Shaded Draw. 
 | 
| 
 | ||||||||||||||||
| Set display format (bold, italic, underline). 
 | 
| 
 | 
| Release and Reopen font in new size. 
 | 
| 
 | 
| Check if file is loaded and pointer to data is non-NULL. 
 | 
| 
 | 
| Check if font output is currently bold. 
 | 
| 
 | 
| Check if font output is currently italic. 
 | 
| 
 | 
| Check if font output is currently underline. 
 | 
| 
 | 
| Check font height as reported by SDL_ttf. 
 | 
| 
 | 
| Check font line skip as reported by SDL_ttf. 
 | 
| 
 | 
| Get Width of String in Current Font in Pixels. 
 
 | 
| 
 | 
| Get Height of String in Current Font in Pixels. 
 
 | 
 1.3-rc2
1.3-rc2