FabGL
ESP32 Display Controller and Graphics Library

◆ drawTextFmt()

void drawTextFmt ( int  X,
int  Y,
const char *  format,
  ... 
)

Draws formatted text at specified position.

drawTextFmt() uses currently selected font (selectFont() method) and currently selected glyph options (setGlyphOptions() method).

Parameters
XHorizontal position of first character left side.
YVertical position of first character top side.
formatFormat specifier like printf.

Example:

Canvas.drawTextFmt(100, 100, "Free DMA memory: %d", heap_caps_get_free_size(MALLOC_CAP_DMA));

Definition at line 466 of file canvas.cpp.