We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f59a57c commit cf64a8bCopy full SHA for cf64a8b
examples/touchpaint_example.py
@@ -41,11 +41,7 @@
41
color_palette[6] = 0xFF00FF
42
color_palette[7] = 0xFFFFFF
43
44
-tile_grid = displayio.TileGrid(
45
- bitmap,
46
- pixel_shader=color_palette
47
-
48
-)
+tile_grid = displayio.TileGrid(bitmap, pixel_shader=color_palette)
49
# tilegrid is flipped to align x, y with touch screen x, y
50
tile_grid.flip_y = True
51
tile_grid.flip_x = True
@@ -73,10 +69,7 @@
73
69
x = t[0]
74
70
y = t[1]
75
71
print(x, y)
76
- if (
77
- not 0 <= x < display.width
78
- or not 0 <= y < display.height
79
- ):
72
+ if not 0 <= x < display.width or not 0 <= y < display.height:
80
continue # Skip out of bounds touches
81
if y < palette_width:
82
current_color = bitmap[x, y]
0 commit comments