From d0494af057aabd0f3c633f939895979b1071bb2c Mon Sep 17 00:00:00 2001 From: Bodmer Date: Thu, 14 Apr 2022 15:14:45 +0100 Subject: [PATCH] Fix #1776 --- Extensions/Sprite.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Extensions/Sprite.cpp b/Extensions/Sprite.cpp index c1af75f..139661c 100644 --- a/Extensions/Sprite.cpp +++ b/Extensions/Sprite.cpp @@ -335,6 +335,18 @@ int8_t TFT_eSprite::getColorDepth(void) } +/*************************************************************************************** +** Function name: setBitmapColor +** Description: Set the 1bpp foreground foreground and background colour +***************************************************************************************/ +void TFT_eSprite::setBitmapColor(uint16_t c, uint16_t b) +{ + if (c == b) b = ~c; + _tft->bitmap_fg = c; + _tft->bitmap_bg = b; +} + + /*************************************************************************************** ** Function name: setPaletteColor ** Description: Set the 4bpp palette color at the given index