Painting context for TUI widgets. More...
#include <painter.h>
Public Member Functions | |
| TuiPainter (TuiScreen &screen, const Rect2Di32 &clipRect) | |
| Constructs a TuiPainter. | |
| void | drawChar (int x, int y, char32_t ch) |
| Draws a single character at the given position. | |
| void | drawText (int x, int y, const String &text) |
| Draws horizontal text at the given position. | |
| void | drawRect (const Rect2Di32 &rect, char32_t ch=0) |
| Draws a rectangle outline using the given character. | |
| void | fillRect (const Rect2Di32 &rect, char32_t ch=U' ') |
| Fills a rectangle with the given character. | |
| void | drawHLine (int x, int y, int len, char32_t ch=U'\u2500') |
| Draws a horizontal line. | |
| void | drawVLine (int x, int y, int len, char32_t ch=U'\u2502') |
| Draws a vertical line. | |
| void | setForeground (const Color &color) |
| Sets the current foreground color. | |
| void | setBackground (const Color &color) |
| Sets the current background color. | |
| void | setAttrs (uint8_t attrs) |
| Sets the current attribute flags. | |
| void | setStyle (const TuiStyle &style) |
| Sets all visual properties from a TuiStyle. | |
| Color | foreground () const |
| Returns the current foreground color. | |
| Color | background () const |
| Returns the current background color. | |
| uint8_t | attrs () const |
| Returns the current attribute flags. | |
| const TuiStyle & | style () const |
| Returns the current style. | |
| void | setClipRect (const Rect2Di32 &rect) |
| Sets the clipping rectangle. | |
| const Rect2Di32 & | clipRect () const |
| Returns the current clipping rectangle. | |
Painting context for TUI widgets.
Draws to a TuiScreen within a clipped region corresponding to the widget's visible area. Coordinates are relative to the clip region origin (the widget's top-left corner in screen coordinates).
Constructs a TuiPainter.
| screen | The screen to draw to. |
| clipRect | The clipping rectangle in screen coordinates. |
Draws a rectangle outline using the given character.
If ch is 0, uses Unicode box-drawing characters.