|
void | recalcDims () |
|
void | reallocSurface () |
|
void | render (int from, int to) |
|
void | render (int from, int to, int shadow) |
|
int | getAlignOffset (int row) |
|
int | getLineWidth (int line, bool enforce=false, int col=-1) |
|
int | getLineHeight (int line) |
|
int | getLineCharWidth (int line, bool enforce=false) |
|
void | splitString (const Common::U32String &str, int curLine, MacFontRun &defaultFormatting) |
|
const Common::U32String::value_type * | splitString (const Common::U32String::value_type *s, int curLine, MacFontRun &defaultFormatting) |
|
void | chopChunk (const Common::U32String &str, int *curLinePtr, int indent, int maxWidth) |
|
Common::U32String | getTextChunk (int startRow, int startCol, int endRow, int endCol, bool formatted=false, bool newlines=true) |
|
void | reshuffleParagraph (int *row, int *col, MacFontRun &defaultFormatting) |
|
void | setMaxWidth (int maxWidth, MacFontRun &defaultFormatting) |
|
void | debugPrint (const char *prefix=nullptr) |
|
◆ getLineWidth()
int Graphics::MacTextCanvas::getLineWidth |
( |
int |
line, |
|
|
bool |
enforce = false , |
|
|
int |
col = -1 |
|
) |
| |
Returns line width in pixels. This takes into account chunks. The result is cached for faster subsequent calls.
- Parameters
-
line | Line number |
enforce | Flag for indicating skipping the cache and computing the width, must be called when text gets changed |
col | Compute line width up to specified column, including this column |
- Returns
- line width in pixels, or 0 for non-existent lines
◆ reshuffleParagraph()
void Graphics::MacTextCanvas::reshuffleParagraph |
( |
int * |
row, |
|
|
int * |
col, |
|
|
MacFontRun & |
defaultFormatting |
|
) |
| |
Rewraps paragraph containing given text row. When text is modified, we redo whole thing again without touching other paragraphs. Also, cursor position is returned in the arguments
The documentation for this class was generated from the following file: