forked from Bodmer/TFT_eSPI
Fix #1877
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user