Update for GC9A01 display

Correct sprite rendering
GC9A01 expects exact number of pixels to fill setWindow area.
This commit is contained in:
Bodmer
2021-11-28 13:57:15 +00:00
parent 07e77ad051
commit 9bf9c0940f
5 changed files with 34 additions and 27 deletions
+2 -2
View File
@@ -441,7 +441,7 @@ bool TFT_eSprite::pushRotated(int16_t angle, uint32_t transp)
if (tpcolor == rp) {
if (pixel_count) {
// TFT window is already clipped, so this is faster than pushImage()
_tft->setWindow(x - pixel_count, y, x, y);
_tft->setWindow(x - pixel_count, y, x - 1, y);
_tft->pushPixels(sline_buffer, pixel_count);
pixel_count = 0;
}
@@ -452,7 +452,7 @@ bool TFT_eSprite::pushRotated(int16_t angle, uint32_t transp)
} while (++x < max_x && (xs += _cosra) < xe && (ys += _sinra) < ye);
if (pixel_count) {
// TFT window is already clipped, so this is faster than pushImage()
_tft->setWindow(x - pixel_count, y, x, y);
_tft->setWindow(x - pixel_count, y, x - 1, y);
_tft->pushPixels(sline_buffer, pixel_count);
}
}