|
void | load (int fontNumber) |
|
int | stringWidth (const CString &text) const |
|
int | writeString (CVideoSurface *surface, const Rect &rect1, const Rect &destRect, int yOffset, const CString &str, CTextCursor *textCursor) |
|
void | writeString (CVideoSurface *surface, const Point &destPos, Rect &clipRect, const CString &str, int lineWidth=0) |
|
int | getTextBounds (const CString &str, int maxWidth, Point *sizeOut) const |
|
void | setColor (byte r, byte g, byte b) |
|
uint16 | getColor () const |
|
|
byte * | _dataPtr |
|
size_t | _dataSize |
|
int | _fontHeight |
|
uint | _dataWidth |
|
CharEntry | _chars [256] |
|
byte | _fontR |
|
byte | _fontG |
|
byte | _fontB |
|
◆ load()
void Titanic::STFont::load |
( |
int |
fontNumber | ) |
|
◆ stringWidth()
int Titanic::STFont::stringWidth |
( |
const CString & |
text | ) |
const |
Return the width in pixels of the specified text
◆ writeString() [1/2]
Write a string to the specified surface
- Returns
- The index of the last character that was visible with the drawing area
◆ writeString() [2/2]
Write a string to the specified surface
◆ getTextBounds()
int Titanic::STFont::getTextBounds |
( |
const CString & |
str, |
|
|
int |
maxWidth, |
|
|
Point * |
sizeOut |
|
) |
| const |
Get the text area a string will fit into
- Parameters
-
str | String |
maxWidth | Maximum width in pixels |
sizeOut | Optional pointer to output size (width, height) |
- Returns
- Required height
◆ setColor()
void Titanic::STFont::setColor |
( |
byte |
r, |
|
|
byte |
g, |
|
|
byte |
b |
|
) |
| |
◆ getColor()
uint16 Titanic::STFont::getColor |
( |
| ) |
const |
The documentation for this class was generated from the following file:
- engines/titanic/support/font.h