FabGL
ESP32 VGA Controller and Graphics Library

◆ drawTextFmt()

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

Draw 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));