Fix bug in 16 bit transparent Sprite

This commit is contained in:
Bodmer
2017-12-03 02:55:43 +00:00
parent 73c7f46f37
commit 7f909a1527
3 changed files with 5 additions and 4 deletions

View File

@@ -613,7 +613,8 @@ void TFT_eSPI::pushSprite(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t
data += dx + dy * w;
int32_t xe = x + dw - 1, ye = y + dh - 1;
transp = transp >> 8 | transp << 8;
while (dh--)
{
int32_t len = dw;
@@ -626,7 +627,7 @@ void TFT_eSPI::pushSprite(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t
if (transp != *ptr)
{
if (move) { move = false; setAddrWindow(px, y, xe, ye); }
SPI.write16(*ptr>>8 | *ptr <<8);
SPI.write16(*ptr>>8 | *ptr<<8);
}
else move = true;
px++;

View File

@@ -1,6 +1,6 @@
{
"name": "TFT_eSPI",
"version": "0.17.16",
"version": "0.17.17",
"keywords": "TFT, ESP8266, NodeMCU, ESP32, ILI9341, ST7735, ILI9163, S6D02A1, ILI9486",
"description": "A TFT SPI graphics library for ESP8266",
"repository":

View File

@@ -1,5 +1,5 @@
name=TFT_eSPI
version=0.17.16
version=0.17.17
author=Bodmer
maintainer=Bodmer
sentence=A fast TFT library for ESP8266 processors and the Arduino IDE