|
LCDGFX LCD display driver
1.2.0
Lightweight graphics library for SSD1306, SSD1325, SSD1327, SSD1331, SSD1351, SH1106, SH1107, IL9163, ST7735, ST7789, ILI9341, PCD8544 displays over I2C/SPI
|
Adafruit_GFX-compatible adapter around any lcdgfx display or canvas type D.
More...
#include <gfx_compat.h>
Public Member Functions | |
| GfxCompat (D &display) | |
| Creates an Adafruit_GFX-compatible facade bound to an existing display. More... | |
| int16_t | width () |
| Returns display width in pixels (Adafruit_GFX::width()). More... | |
| int16_t | height () |
| Returns display height in pixels (Adafruit_GFX::height()). More... | |
| void | drawPixel (int16_t x, int16_t y, uint16_t color) |
| Draws a single pixel of the given color (Adafruit_GFX::drawPixel()). More... | |
| void | drawFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color) |
Draws a vertical run of h pixels (Adafruit_GFX::drawFastVLine()). More... | |
| void | drawFastHLine (int16_t x, int16_t y, int16_t w, uint16_t color) |
Draws a horizontal run of w pixels (Adafruit_GFX::drawFastHLine()). More... | |
| void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) |
| Draws an arbitrary line (Adafruit_GFX::drawLine()). More... | |
| void | drawRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
| Draws a rectangle outline of size w*h (Adafruit_GFX::drawRect()). More... | |
| void | fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
| Fills a rectangle of size w*h (Adafruit_GFX::fillRect()). More... | |
| void | fillScreen (uint16_t color) |
| Fills the whole screen with a single color (Adafruit_GFX::fillScreen()). More... | |
| void | drawCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
| Draws a circle outline (Adafruit_GFX::drawCircle()). More... | |
| void | fillCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
| Draws a filled circle (Adafruit_GFX::fillCircle()). More... | |
| void | drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) |
| Draws a triangle outline (Adafruit_GFX::drawTriangle()). More... | |
| void | fillTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) |
| Draws a filled triangle (Adafruit_GFX::fillTriangle()). More... | |
| void | drawRoundRect (int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color) |
| Draws a rounded-rectangle outline (Adafruit_GFX::drawRoundRect()). More... | |
| void | fillRoundRect (int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color) |
| Draws a filled rounded rectangle (Adafruit_GFX::fillRoundRect()). More... | |
| void | drawBitmap (int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) |
Draws a 1-bit bitmap using the foreground color (Adafruit_GFX::drawBitmap()). More... | |
| void | setCursor (int16_t x, int16_t y) |
| Positions the text cursor (Adafruit_GFX::setCursor()). More... | |
| void | setTextColor (uint16_t color) |
| Sets text foreground color (Adafruit_GFX::setTextColor()). More... | |
| void | setTextColor (uint16_t color, uint16_t background) |
| Sets text foreground and background color (Adafruit_GFX::setTextColor()). More... | |
| void | setFont (const GFXfont *font) |
Selects an Adafruit_GFX custom font (GFXfont) for text output. More... | |
| void | setTextSize (uint8_t size) |
| Accepts an Adafruit_GFX text size. More... | |
| void | setRotation (uint8_t rotation) |
| Accepts an Adafruit_GFX rotation value for source compatibility. More... | |
| uint8_t | getRotation () |
| Returns the stored rotation value (Adafruit_GFX::getRotation()). More... | |
| size_t | write (uint8_t ch) |
| Writes a single character at the text cursor (Adafruit_GFX::write()). More... | |
| void | print (const char *str) |
| Prints a null-terminated string (Adafruit_GFX/Print::print()). More... | |
| void | print (char c) |
| Prints a single character (Adafruit_GFX/Print::print()). More... | |
| void | print (int number) |
| Prints a signed integer in base 10 (Adafruit_GFX/Print::print()). More... | |
| void | print (long number) |
| Prints a signed long in base 10 (Adafruit_GFX/Print::print()). More... | |
| void | println (const char *str) |
| Prints a string followed by a newline (Adafruit_GFX/Print::println()). More... | |
| void | println (int number) |
| Prints an integer followed by a newline (Adafruit_GFX/Print::println()). More... | |
| void | println () |
| Emits a newline (Adafruit_GFX/Print::println()). More... | |
| void | startWrite () |
| Adafruit_GFX transaction start hook. More... | |
| void | writePixel (int16_t x, int16_t y, uint16_t color) |
| Adafruit_GFX transaction pixel write; identical to drawPixel(). More... | |
| void | endWrite () |
| Adafruit_GFX transaction end hook. More... | |
| D & | display () |
| Returns the wrapped lcdgfx display/canvas for native calls. More... | |
Adafruit_GFX-compatible adapter around any lcdgfx display or canvas type D.
D must expose the standard lcdgfx primitives: setColor(), setBackground(), putPixel(), drawHLine(), drawVLine(), drawLine(), drawRect(), fillRect(), drawCircle(), drawBitmap1(), width(), height(), setTextCursor(), write(). All lcdgfx Display* classes and NanoCanvasOps-based canvases qualify.
Definition at line 107 of file gfx_compat.h.
Creates an Adafruit_GFX-compatible facade bound to an existing display.
| display | reference to an already-constructed lcdgfx display/canvas. The reference must outlive the adapter. |
Definition at line 115 of file gfx_compat.h.
|
inline |
Returns the wrapped lcdgfx display/canvas for native calls.
Definition at line 443 of file gfx_compat.h.
|
inline |
Draws a 1-bit bitmap using the foreground color (Adafruit_GFX::drawBitmap()).
Bitmap layout matches lcdgfx drawBitmap1.
Definition at line 288 of file gfx_compat.h.
|
inline |
Draws a circle outline (Adafruit_GFX::drawCircle()).
Definition at line 197 of file gfx_compat.h.
|
inline |
Draws a horizontal run of w pixels (Adafruit_GFX::drawFastHLine()).
Definition at line 156 of file gfx_compat.h.
|
inline |
Draws a vertical run of h pixels (Adafruit_GFX::drawFastVLine()).
Definition at line 147 of file gfx_compat.h.
|
inline |
Draws an arbitrary line (Adafruit_GFX::drawLine()).
Definition at line 165 of file gfx_compat.h.
|
inline |
Draws a single pixel of the given color (Adafruit_GFX::drawPixel()).
Definition at line 133 of file gfx_compat.h.
|
inline |
Draws a rectangle outline of size w*h (Adafruit_GFX::drawRect()).
Definition at line 172 of file gfx_compat.h.
|
inline |
Draws a rounded-rectangle outline (Adafruit_GFX::drawRoundRect()).
Definition at line 254 of file gfx_compat.h.
|
inline |
Draws a triangle outline (Adafruit_GFX::drawTriangle()).
Definition at line 215 of file gfx_compat.h.
|
inline |
|
inline |
Draws a filled circle (Adafruit_GFX::fillCircle()).
Definition at line 206 of file gfx_compat.h.
|
inline |
Fills a rectangle of size w*h (Adafruit_GFX::fillRect()).
Definition at line 181 of file gfx_compat.h.
|
inline |
Draws a filled rounded rectangle (Adafruit_GFX::fillRoundRect()).
Definition at line 272 of file gfx_compat.h.
|
inline |
Fills the whole screen with a single color (Adafruit_GFX::fillScreen()).
Definition at line 190 of file gfx_compat.h.
|
inline |
Draws a filled triangle (Adafruit_GFX::fillTriangle()).
Definition at line 230 of file gfx_compat.h.
|
inline |
Returns the stored rotation value (Adafruit_GFX::getRotation()).
Definition at line 348 of file gfx_compat.h.
|
inline |
Returns display height in pixels (Adafruit_GFX::height()).
Definition at line 127 of file gfx_compat.h.
|
inline |
Prints a null-terminated string (Adafruit_GFX/Print::print()).
Definition at line 369 of file gfx_compat.h.
|
inline |
Prints a single character (Adafruit_GFX/Print::print()).
Definition at line 385 of file gfx_compat.h.
|
inline |
Prints a signed integer in base 10 (Adafruit_GFX/Print::print()).
Definition at line 391 of file gfx_compat.h.
|
inline |
Prints a signed long in base 10 (Adafruit_GFX/Print::print()).
Definition at line 397 of file gfx_compat.h.
|
inline |
Prints a string followed by a newline (Adafruit_GFX/Print::println()).
Definition at line 405 of file gfx_compat.h.
|
inline |
Prints an integer followed by a newline (Adafruit_GFX/Print::println()).
Definition at line 412 of file gfx_compat.h.
|
inline |
Emits a newline (Adafruit_GFX/Print::println()).
Definition at line 419 of file gfx_compat.h.
|
inline |
Positions the text cursor (Adafruit_GFX::setCursor()).
Definition at line 297 of file gfx_compat.h.
Selects an Adafruit_GFX custom font (GFXfont) for text output.
Pass a font produced by Adafruit's fontconvert tool. Call setFont(nullptr) to revert to the underlying display's built-in fixed font.
Definition at line 324 of file gfx_compat.h.
|
inline |
Accepts an Adafruit_GFX rotation value for source compatibility.
Rotation is configured through the underlying display; the value is stored only.
Definition at line 342 of file gfx_compat.h.
|
inline |
Sets text foreground color (Adafruit_GFX::setTextColor()).
Definition at line 305 of file gfx_compat.h.
|
inline |
Sets text foreground and background color (Adafruit_GFX::setTextColor()).
Definition at line 312 of file gfx_compat.h.
|
inline |
Accepts an Adafruit_GFX text size.
lcdgfx uses fixed-cell fonts, so only size 1 renders scaled output; other values are stored but not applied.
Definition at line 333 of file gfx_compat.h.
|
inline |
|
inline |
Returns display width in pixels (Adafruit_GFX::width()).
Definition at line 121 of file gfx_compat.h.
|
inline |
Writes a single character at the text cursor (Adafruit_GFX::write()).
Definition at line 354 of file gfx_compat.h.
|
inline |
Adafruit_GFX transaction pixel write; identical to drawPixel().
Definition at line 432 of file gfx_compat.h.