This commit is contained in:
Gavin Hurlbut 2024-10-01 11:58:43 -04:00 committed by GitHub
commit bcdb3d2c51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -172,6 +172,20 @@ void Adafruit_GFX::writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
} }
} }
/**************************************************************************/
/*!
@brief Clear the display, overwrite in subclasses.
*/
/**************************************************************************/
void Adafruit_GFX::clearDisplay() {}
/**************************************************************************/
/*!
@brief Update the display, overwrite in subclasses.
*/
/**************************************************************************/
void Adafruit_GFX::display() {}
/**************************************************************************/ /**************************************************************************/
/*! /*!
@brief Start a display-writing routine, overwrite in subclasses. @brief Start a display-writing routine, overwrite in subclasses.

View File

@ -10,7 +10,9 @@
#include "gfxfont.h" #include "gfxfont.h"
#include <Adafruit_I2CDevice.h> #include <Adafruit_I2CDevice.h>
#ifndef SKIP_SPI
#include <Adafruit_SPIDevice.h> #include <Adafruit_SPIDevice.h>
#endif
/// A generic graphics superclass that can handle all sorts of drawing. At a /// A generic graphics superclass that can handle all sorts of drawing. At a
/// minimum you can subclass and provide drawPixel(). At a maximum you can do a /// minimum you can subclass and provide drawPixel(). At a maximum you can do a
@ -43,6 +45,8 @@ public:
virtual void writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, virtual void writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
uint16_t color); uint16_t color);
virtual void endWrite(void); virtual void endWrite(void);
virtual void clearDisplay(void);
virtual void display(void);
// CONTROL API // CONTROL API
// These MAY be overridden by the subclass to provide device-specific // These MAY be overridden by the subclass to provide device-specific