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 12beb94 commit 5b0c84aCopy full SHA for 5b0c84a
adafruit_display_shapes/rect.py
@@ -62,6 +62,9 @@ def __init__(
62
self._bitmap = displayio.Bitmap(width, height, 2)
63
self._palette = displayio.Palette(2)
64
65
+ if width <= 0 or height <= 0:
66
+ raise ValueError("Width and height must be greater than 0")
67
+
68
if outline is not None:
69
self._palette[1] = outline
70
for w in range(width):
adafruit_display_shapes/roundrect.py
@@ -68,6 +68,9 @@ def __init__(
y_offset=height - 2 * r - 1,
)
71
72
73
74
if fill is not None:
75
self._palette[2] = fill
76
self._palette.make_opaque(2)
0 commit comments