diff --git a/Extensions/Sprite.cpp b/Extensions/Sprite.cpp index 5017bdb..baaa057 100644 --- a/Extensions/Sprite.cpp +++ b/Extensions/Sprite.cpp @@ -423,7 +423,7 @@ bool TFT_eSprite::pushRotated(int16_t angle, uint32_t transp) if (_bpp == 4) tpcolor = _colorMap[transp & 0x0F]; tpcolor = tpcolor>>8 | tpcolor<<8; // Working with swapped color bytes } - _tft->startWrite(); // Avoid transaction overhead for every tft pixel + _tft->startWrite(); // Avoid transaction overhead for every tft pixel // Scan destination bounding box and fetch transformed pixels from source Sprite for (int32_t y = min_y; y <= max_y; y++, yt++) { @@ -441,7 +441,7 @@ bool TFT_eSprite::pushRotated(int16_t angle, uint32_t transp) int32_t yp = ys >> FP_SCALE; if (_bpp == 16) {rp = _img[xp + yp * _iwidth]; } else { rp = readPixel(xp, yp); rp = (uint16_t)(rp>>8 | rp<<8); } - if (tpcolor == rp) { + if (transp != 0x00FFFFFF && tpcolor == rp) { if (pixel_count) { // TFT window is already clipped, so this is faster than pushImage() _tft->setWindow(x - pixel_count, y, x - 1, y); @@ -517,7 +517,7 @@ bool TFT_eSprite::pushRotated(TFT_eSprite *spr, int16_t angle, uint32_t transp) int32_t yp = ys >> FP_SCALE; if (_bpp == 16) rp = _img[xp + yp * _iwidth]; else { rp = readPixel(xp, yp); rp = (uint16_t)(rp>>8 | rp<<8); } - if (tpcolor == rp) { + if (transp != 0x00FFFFFF && tpcolor == rp) { if (pixel_count) { spr->pushImage(x - pixel_count, y, pixel_count, 1, sline_buffer); pixel_count = 0; diff --git a/library.json b/library.json index 989363e..2323898 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "TFT_eSPI", - "version": "2.4.70", + "version": "2.4.71", "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 58477bd..4d8855c 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TFT_eSPI -version=2.4.70 +version=2.4.71 author=Bodmer maintainer=Bodmer sentence=TFT graphics library for Arduino processors with performance optimisation for RP2040, STM32, ESP8266 and ESP32