Merge pull request #239 from solhuebner/patch-1

Added missing fillScreenRGB888 to VirtualMatrixPanel
This commit is contained in:
mrfaptastic 2022-01-13 15:32:11 +00:00 committed by GitHub
commit fa2ae18313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,6 +98,7 @@ class VirtualMatrixPanel
// equivalent methods of the matrix library so it can be just swapped out. // equivalent methods of the matrix library so it can be just swapped out.
virtual void drawPixel(int16_t x, int16_t y, uint16_t color); virtual void drawPixel(int16_t x, int16_t y, uint16_t color);
virtual void fillScreen(uint16_t color); // overwrite adafruit implementation virtual void fillScreen(uint16_t color); // overwrite adafruit implementation
virtual void fillScreenRGB888(uint8_t r, uint8_t g,uint8_t b);
void clearScreen() { display->clearScreen(); } void clearScreen() { display->clearScreen(); }
void drawPixelRGB888(int16_t x, int16_t y, uint8_t r, uint8_t g, uint8_t b); void drawPixelRGB888(int16_t x, int16_t y, uint8_t r, uint8_t g, uint8_t b);
@ -256,6 +257,10 @@ inline void VirtualMatrixPanel::fillScreen(uint16_t color) { // adafruit virtual
this->display->fillScreen(color); this->display->fillScreen(color);
} }
inline void VirtualMatrixPanel::fillScreenRGB888(uint8_t r, uint8_t g,uint8_t b) {
this->display->fillScreenRGB888(r, g, b);
}
inline void VirtualMatrixPanel::drawPixelRGB888(int16_t x, int16_t y, uint8_t r, uint8_t g, uint8_t b) { inline void VirtualMatrixPanel::drawPixelRGB888(int16_t x, int16_t y, uint8_t r, uint8_t g, uint8_t b) {
getCoords(x, y); getCoords(x, y);
this->display->drawPixelRGB888( coords.x, coords.y, r, g, b); this->display->drawPixelRGB888( coords.x, coords.y, r, g, b);