loboris / ESP32_TFT_library

Full featured TFT library for ESP32 with demo application
553 stars 219 forks source link

Can't _fillRect at the far right edge #97

Open MarkJeronimus opened 3 years ago

MarkJeronimus commented 3 years ago

Because of a typo, 1-wide filled rectangles, aligned at the right edge of the clipping window, become invisible:

https://github.com/loboris/ESP32_TFT_library/blob/aa21772f54a71887ec08b2e8bbaef9e304009891/components/tft/tft.c#L278

should be

if ((x > dispWin.x2) || (y > dispWin.y2)) return;

Because of this, an image composed of 2x2 rectangles (or larger), scrolling across and beyond the screen, causes artifacts at the right edge.