#include <MAUI/Font.h>
Public Member Functions | |
| Font (MAHandle font) | |
| ~Font () | |
| void | setResource (MAHandle font) |
| MAHandle | getHandle () const |
| const char * | getName () const |
| void | setLineSpacing (int size=0) |
| int | getLineSpacing () const |
| MAExtent | getStringDimensions (const char *str, int length=-1) const |
| MAExtent | getBoundedStringDimensions (const char *str, const Rect &bound, int length=-1) const |
| int | getLineBreak (int line, const char *str, const Rect &bound) const |
| int | calculateLine (int index, const char *str, const Rect &bound) const |
| Rect | calculateRectOfIndex (int index, const char *str, const Rect &bound) const |
| void | drawString (const char *str, int x, int y) |
| void | drawBoundedString (const char *str, int x, int y, const Rect &bound) |
| const Charset & | getCharset () const |
Protected Member Functions | |
| void | calcCharPos (char c, int *x, int *y) |
| void | calcLineBreaks (const char *str, int x, int y, const Rect &bound) const |
Protected Attributes | |
| MAHandle | fontImage |
| Charset * | charset |
| int | mLineSpacing |
|
|
Constructor, takes a handle to a binary resource with font data |
|
|
|
|
|
Sets the binary resource with font data to be used by this font |
|
|
Returns a handle to the binary resource used by the font |
|
|
Returns the plain-text name of the font |
|
|
Sets the number of pixels between each line of text. The default is 0. |
|
|
Returns the line spacing.
|
|
||||||||||||
|
Returns the width and height of str when rendered with this font |
|
||||||||||||||||
|
Returns the width and height of str when rendered with this font and bounded by the rectangle specified by bound. |
|
||||||||||||||||
|
Returns the index of the first character of str on the line given by "line", assuming that the string has been linebroken according to bounds. |
|
||||||||||||||||
|
Returns the line on which the character at index in str would end up, if the string were linebroken according to bounds. |
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Renders str at x, y |
|
||||||||||||||||||||
|
Renders str, linebroken according to bounds, at x,y. Adds lineSpacing pixels of space between each line. |
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
1.4.6-NO