Inherits Adafruit_GFX.
|
| | CHGfx_GFX () |
| | Makes a GFX_W x GFX_H display.
|
| |
| void | begin (uint8_t spiDiv=GFX_DIV2, uint8_t colorMode=GFX_16BPP) |
| | Starts the panel, as gfx_begin().
|
| |
| void | drawPixel (int16_t x, int16_t y, uint16_t color) override |
| | Sets one pixel in the framebuffer (gfx_pixel()).
|
| |
| void | drawFastHLine (int16_t x, int16_t y, int16_t w, uint16_t color) override |
| | Draws a horizontal line (gfx_hline()).
|
| |
| void | drawFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color) override |
| | Draws a vertical line (gfx_vline()).
|
| |
| void | fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) override |
| | Fills a rectangle (gfx_fillRect()).
|
| |
| void | fillScreen (uint16_t color) override |
| | Fills the screen (the clip rectangle) with one colour (gfx_clear()).
|
| |
| void | writePixel (int16_t x, int16_t y, uint16_t color) override |
| | Sets one pixel (gfx_pixel()); the same as drawPixel().
|
| |
| void | writeFillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) override |
| | Fills a rectangle (gfx_fillRect()); the same as fillRect().
|
| |
| void | writeFastHLine (int16_t x, int16_t y, int16_t w, uint16_t color) override |
| | Draws a horizontal line (gfx_hline()); the same as drawFastHLine().
|
| |
| void | writeFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color) override |
| | Draws a vertical line (gfx_vline()); the same as drawFastVLine().
|
| |
| void | startWrite (void) override |
| | Does nothing: drawing goes to RAM, so there is nothing to batch.
|
| |
| void | endWrite (void) override |
| | Does nothing: drawing goes to RAM, so there is nothing to batch.
|
| |
| void | display () |
| | Sends the whole framebuffer to the panel and waits for it (gfx_flush()).
|
| |
| void | displayAsync () |
| | Starts sending the whole framebuffer by DMA and returns at once (gfx_flushAsync()).
|
| |
| void | displayRect (int x, int y, int w, int h) |
| | Sends one rectangle of the framebuffer and waits for it (gfx_flushRect()).
|
| |
| void | displayRectAsync (int x, int y, int w, int h) |
| | Starts sending one rectangle of the framebuffer and returns at once (gfx_flushRectAsync()).
|
| |
| bool | busy () const |
| | Whether an async flush is in flight (gfx_busy()).
|
| |
| void | wait () |
| | Waits for the flush in flight to finish (gfx_wait()); draw after it.
|
| |
| void | setPalette (const uint16_t *p, uint8_t n) |
| | Sets the first n palette entries (gfx_setPalette()).
|
| |
| void | setPaletteEntry (uint8_t i, uint16_t c) |
| | Sets one palette entry (gfx_setPaletteEntry()).
|
| |
| uint8_t | nearest (uint16_t rgb565) const |
| | Nearest palette index for an RGB565 colour (gfx_nearest()): map Adafruit colour constants once at setup.
|
| |
| void | setColorMode (uint8_t m) |
| | Switches the colour output mode (gfx_setColorMode()).
|
| |
An Adafruit_GFX display that draws into CHGfx's 4 bpp framebuffer and presents it by DMA.
Adafruit_GFX's print(), fonts, bitmaps, triangles and the rest work as usual; the pixel and span primitives go to CHGfx's fast paths. Every color is a palette index, 0..15 (only the low 4 bits are used), unless CHGFX_GFX_AUTOMAP is defined, in which case it is an RGB565 colour matched to the nearest palette entry at every call. Nothing reaches the panel until display() or displayAsync().