Skip to content

Display (M5GFX)

Official M5GFX documentation: github.com/m5stack/M5GFX
Source header: lgfx/v1/LGFXBase.hpp

The display is a full-featured M5GFX object. The API is split into the following pages:

Page Content
Colors Named colors, color565(), color888(), setColor()
Primitives drawPixel, drawLine, drawRect, fillRect, drawCircle, fillCircle, drawTriangle, fillTriangle, arcs, bezier curves, flood fill, smooth lines
Text setFont, setTextSize, setTextColor, setTextDatum, drawString, drawCenterString, drawNumber, printf, cursor control, text wrap, text scroll
Images pushImage, drawBitmap, drawBmp, drawJpg, drawPng, drawBmpFile, drawJpgFile, drawPngFile
Utilities fillScreen, setRotation, setBrightness, qrcode, progressBar, pushState/popState, startWrite/endWrite
// Access via global instance
M5Cardputer.Display.fillScreen(TFT_BLACK);
M5Cardputer.Display.drawString("Hello", 10, 10);