I want to draw two rectangles on my 160x128 pixel TFT screen.
On the top side a box that contains some text and a second one in the lowwer part that is colored.
these two lines of code do draw a nice box in the upper part of the screen.
But if I add the next line the top rectangle becomes green and a clear box is drawn
But what library do you use? I suppose you effectively use Adafruit GFX.
160 x 128 display: the coordinates stay in [0 - 159] and [0 - 127].
The first drawRect makes a rectangle on the lower half of the display, from Y=116 to Y=127.
The second makes a rectangle on the top half, from Y=0 to Y=115.