Public Types |
| enum | alignments { ALIGN_LEFT,
ALIGN_CENTER,
ALIGN_RIGHT
} |
Public Methods |
| | CL_Font (CL_Font_Description *provider) |
| | param: resource_id - The resource ID of the font.param: resource_manager - The resource manager used to load theparam: resources from.construction:.
|
| | CL_Font (const char *resource_id, CL_ResourceManager *manager) |
| | CL_Font (const CL_Font &font) |
| virtual | ~CL_Font () |
| int | get_height () |
| | functions:.
|
| int | get_text_width (const char *text) |
| | retval: Width of the font.
|
| int | get_char_width (const char character) |
| | param: text - Text string the width should be calculated from.retval: Width of the text (in pixels).
|
| void | print_left (int x, int y, const char *text, int n_height=1) |
| | param: text - Character the width should be calculated from.retval: Width of the character (in pixels).
|
| void | print_left (int x, int y, float scale_x, float scale_y, const char *text) |
| | param: x - X coordinate (in pixels) the text is drawn at.param: y - Y coordiante (in pixels) the text is drawn at.param: text - The text to be drawn with this font.param: n_height - Adds font height + n_height pixels to Y coordinate on new line ('
').
|
| void | print_center (int x, int y, const char *text) |
| | param: x - X coordinate (in pixels) the text is drawn at.param: y - Y coordiante (in pixels) the text is drawn at.param: scale_x - Scale font width scale_x times.param: scale_y - Scale font height scale_y times.param: text - The text to be drawn with this font.
|
| void | print_right (int x, int y, const char *text) |
| | param: x - X coordinate (in pixels) the text is centered at.param: y - Y coordiante (in pixels) the text is centered at.param: text - The text to be drawn with this font.
|
| void | put_target (int x, int y, const char *text, CL_Target *target, int alignment=ALIGN_LEFT) |
| | param: x - X coordinate (in pixels) the text is ends at.param: y - Y coordiante (in pixels) the text is drawn at.param: text - The text to be drawn with this font.
|
| int | change_size (int size) |
| | param: x - X coordinate (in pixels)param: y - Y coordiante (in pixels)param: text - The text to be drawn with this font.param: target - the target surface to blit to.param: alignment - the alignment of the text, CL_Font::ALIGN_LEFT, CL_Font::ALIGN_CENTER, CL_Font::ALIGN_RIGHT.
|
| unsigned int | change_colour (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| | param: size - The new size to use.retval: Returns the size set or -1 if the font size cannot be changed to size.
|
| | CL_Font (class CL_Font_Generic *impl) |
| | param: r - The red componentparam: g - The green componentparam: b - The blue componentparam: a - The alpha componentretval: Returns the font set in packed ARGB format.implementation:.
|
Public Attributes |
| class CL_Font_Generic* | impl |
Static Public Methods |
| CL_Font* | create (CL_Font_Description *font_desc) |
| | static_init:.
|
| CL_Font* | load (const char *resource_id, CL_ResourceManager *resource_manager) |
| | param: font_desc - The font description used to construct the font.
|