SimpleTextFormatter

helper to split text into several lines and draw it

Members

Functions

draw
void draw(DrawBuf buf, int x, int y, FontRef fnt, uint color)

draw formatted text

draw
void draw(DrawBuf buf, int x, int y, FontRef fnt, uint color, ubyte alignment)

draw horizontaly aligned formatted text

format
Point format(dchar[] text, FontRef fnt, int maxLines, int maxWidth, int tabSize, int tabOffset, uint textFlags)

split text into lines and measure it; returns size in pixels

Variables

_lines
dstring[] _lines;
Undocumented in source.
_linesWidths
int[] _linesWidths;
Undocumented in source.
_maxLineWidth
int _maxLineWidth;
Undocumented in source.
_tabOffset
int _tabOffset;
Undocumented in source.
_tabSize
int _tabSize;
Undocumented in source.
_textFlags
uint _textFlags;
Undocumented in source.

Meta