Closed dobodu closed 6 months ago
So the code I ran was something like:
tft = tft_config.config()
tft.reset()
tft.init()
tft.rotation(0)
tft.rect(0,0,20,20,tft.colorRGB(255,0,0))
tft.rect(0,0,100,100,tft.colorRGB(255,255,0))
tft.rect(0,0,200,200,tft.colorRGB(255,255,0))
# for the one above
tft.rect(0,0,239,240,tft.colorRGB(255,255,0))
#and for the one below
tft.rect(0,0,240,240,tft.colorRGB(255,255,0))
The coordinates start at 0
but it only has 240 pixels in width/height, which means, the valid inputs should be in the range of [0, 239]
.
However, there is indeed a not-so-uniform range for rect(start_x, start_y, rect_width, rect_height)
and fill_rect(start_x, start_y, rect_width, rect_height)
, and that should be indeed changed. Depending on how you view the problem, one can argue whether to count the first pixel into width or not. I am going to make this uniform now the first pixel will be count into width and height.
Truncated in height (I think about 32 pix height)
Could you please add some pictures for me to actually have a view on that problem? I failed to reproduce the issue. (even measured with a ruler, lol)
That's right... I must have made a mistake... The code I was trying was
display.fill_rect(0, 0, 20, 20, Bl_color)
sleep_ms(1000)
display.fill_rect(0, 0, 100, 100, Rd_color)
sleep_ms(1000)
display.fill_rect(0, 0, 200, 200, Bl_color)
sleep_ms(1000)
display.fill_rect(0, 0, 400, 240, Rd_color)
sleep_ms(1000)
But as I rebooted all the system now, it doesn't show wht I thought to be a bug... Maybe doing too many things at the sime time in my code...
Sorry for disturbing !
That's fine! Thank you for testing the code out!
Trying
but for larger one
I think this is comming from the fill_buffer C function