8template <
typename RGB_T>
class ISurface;
11
12
13
14
15
16
17
18template <
typename RGB_T =
RGB565>
25 virtual void drawText(ISurface<RGB_T>& target, int16_t x, int16_t y,
26 const char* text, RGB_T foreground, RGB_T background,
27 bool opaque =
false, uint8_t scale = 1,
28 uint8_t spacing = 1, uint8_t lineSpacing = 1)
const = 0;
Font rendering interface for TinyGPU-compatible framebuffers.
Definition: IFont.h:19
virtual void drawText(ISurface< RGB_T > &target, int16_t x, int16_t y, const char *text, RGB_T foreground, RGB_T background, bool opaque=false, uint8_t scale=1, uint8_t spacing=1, uint8_t lineSpacing=1) const =0
Draws a text string onto a framebuffer target.
virtual size_t measureTextHeight(const char *text, uint8_t scale=1, uint8_t lineSpacing=1) const =0
Returns the total text height in pixels.
virtual ~IFont()=default
Destroys the font interface.
virtual size_t measureTextWidth(const char *text, uint8_t scale=1, uint8_t spacing=1) const =0
Returns the width of the longest text line in pixels.
virtual size_t getHeight(uint8_t scale) const =0
Returns the scaled glyph height in pixels.
RGB color stored in 16-bit RGB565 format.
Definition: RGB565.h:13
Definition: AVIWriter.h:9