You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### displayio or bitmaptools bug with missing pixels### perhaps related to dirty region code for efficient screen updates?### Demonstrated on Adafruit CLUE with 9.0.3 and 9.0.4importarrayimporttimeimportboardimportdisplayioimportbitmaptoolsp1= [(170, 120), (168, 105), (160, 91), (149, 80), (135, 72), (120, 70)]
p2= [(120, 70), (105, 72), (91, 80), (80, 91), (72, 105), (70, 120)]
p3= [(70, 120), (72, 135), (80, 149), (91, 160), (105, 168), (120, 170)]
p4= [(120, 170), (135, 168), (149, 160), (160, 149), (168, 135), (170, 120)]
display=board.DISPLAYmain_group=displayio.Group()
display.root_group=main_groupbmp=displayio.Bitmap(240, 240, 8)
palette=displayio.Palette(8)
palette[1] =0xe00000palette[2] =0x00e000palette[3] =0x0000e0palette[4] =0xe0e0e0palette[5] =0x606060tg=displayio.TileGrid(bitmap=bmp, pixel_shader=palette)
main_group.append(tg)
pal_idx=1forpointsin (p1, p2, p3, p4):
bitmaptools.draw_polygon(bmp,
array.array("h",[xy[0] forxyinpoints]),
array.array("h",[xy[1] forxyinpoints]),
pal_idx,
close=False)
pal_idx+=1time.sleep(3)
print("some pixels are missing when drawing p4")
bitmaptools.draw_polygon(bmp,
array.array("h",[0, 239]),
array.array("h",[0, 239]),
pal_idx,
close=False)
print("they appear after this line is drawn across whole display")
whileTrue:
pass
Behavior
Some pixels are missing from the final pass of the for loop for p4. Might be one or two missing for p3 too.
Description
I did this on a CLUE. I'd suggest using that or something with a 240x240xsame-bit-depth resolution display to investigate further/indepdently reproduce.
Additional information
I think there's some code for "dirty" regions of the display signifying needing an update of a rectangular area sent to the physical screen. I'd suspect there is a fault somewhere between bitmaptools and displayio ...
The text was updated successfully, but these errors were encountered:
CircuitPython version
Code/REPL
Behavior
Some pixels are missing from the final pass of the
for
loop forp4
. Might be one or two missing forp3
too.Description
I did this on a CLUE. I'd suggest using that or something with a 240x240xsame-bit-depth resolution display to investigate further/indepdently reproduce.
Additional information
I think there's some code for "dirty" regions of the display signifying needing an update of a rectangular area sent to the physical screen. I'd suspect there is a fault somewhere between
bitmaptools
anddisplayio
...The text was updated successfully, but these errors were encountered: