diff --git a/Extensions/Sprite.cpp b/Extensions/Sprite.cpp index baaa057..e3db710 100644 --- a/Extensions/Sprite.cpp +++ b/Extensions/Sprite.cpp @@ -2417,6 +2417,8 @@ void TFT_eSprite::drawGlyph(uint16_t code) { uint16_t fg = textcolor; uint16_t bg = textbgcolor; + bool getBG = false; + if (fg == bg) getBG = true; // Check if cursor has moved if (last_cursor_x != cursor_x) @@ -2551,7 +2553,7 @@ void TFT_eSprite::drawGlyph(uint16_t code) else drawFastHLine( fxs, y + cy, fl, fg); fl = 0; } - if (getColor) bg = getColor(x + cx, y + cy); + if (getBG) bg = readPixel(x + cx, y + cy); drawPixel(x + cx, y + cy, alphaBlend(pixel, fg, bg)); } else diff --git a/TFT_eSPI.h b/TFT_eSPI.h index 2a22938..ac8c1e2 100644 --- a/TFT_eSPI.h +++ b/TFT_eSPI.h @@ -16,7 +16,7 @@ #ifndef _TFT_eSPIH_ #define _TFT_eSPIH_ -#define TFT_ESPI_VERSION "2.4.73" +#define TFT_ESPI_VERSION "2.4.74" // Bit level feature flags // Bit 0 set: viewport capability diff --git a/examples/Smooth Graphics/Anti-aliased_Clock/Anti-aliased_Clock.ino b/examples/Smooth Graphics/Anti-aliased_Clock/Anti-aliased_Clock.ino index 1cdd422..b4181f3 100644 --- a/examples/Smooth Graphics/Anti-aliased_Clock/Anti-aliased_Clock.ino +++ b/examples/Smooth Graphics/Anti-aliased_Clock/Anti-aliased_Clock.ino @@ -129,7 +129,7 @@ static void renderFace(float t) { face.setTextDatum(MC_DATUM); // The background colour will be read during the character rendering - face.setTextColor(CLOCK_FG); + face.setTextColor(CLOCK_FG, CLOCK_BG); // Text offset adjustment constexpr uint32_t dialOffset = CLOCK_R - 10; @@ -143,7 +143,7 @@ static void renderFace(float t) { } // Add text (could be digital time...) - face.setTextColor(LABEL_FG); + face.setTextColor(LABEL_FG, CLOCK_BG); face.drawString("TFT_eSPI", CLOCK_R, CLOCK_R * 0.75); // Draw minute hand diff --git a/examples/Smooth Graphics/Anti-aliased_Clock/NTP_Time.h b/examples/Smooth Graphics/Anti-aliased_Clock/NTP_Time.h index 1a85e04..a2eaf12 100644 --- a/examples/Smooth Graphics/Anti-aliased_Clock/NTP_Time.h +++ b/examples/Smooth Graphics/Anti-aliased_Clock/NTP_Time.h @@ -14,7 +14,7 @@ #ifdef ESP8266 // ESP8266 #include -#elif defined(ARDUINO_ARCH_MBED) || defined(ARDUINO_ARCH_RP2040) +#elif (defined(ARDUINO_ARCH_MBED) || defined(ARDUINO_ARCH_RP2040)) && !defined(ARDUINO_RASPBERRY_PI_PICO_W) // RP2040 Nano Connect #include #else diff --git a/library.json b/library.json index 554dfa2..98107f7 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "TFT_eSPI", - "version": "2.4.73", + "version": "2.4.74", "keywords": "Arduino, tft, display, ttgo, LilyPi, WT32-SC01, ePaper, display, Pico, RP2040 Nano Connect, RP2040, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9481, ILI9486, ILI9488, ST7789, ST7796, RM68140, SSD1351, SSD1963, ILI9225, HX8357D, GC9A01, R61581", "description": "A TFT and ePaper SPI graphics library with optimisation for Raspberry Pi Pico, RP2040, ESP8266, ESP32 and STM32", "repository": diff --git a/library.properties b/library.properties index ca7de10..1c5b94f 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TFT_eSPI -version=2.4.73 +version=2.4.74 author=Bodmer maintainer=Bodmer sentence=TFT graphics library for Arduino processors with performance optimisation for RP2040, STM32, ESP8266 and ESP32