Skip to content

Commit e86f641

Browse files
author
Margaret Matocha
committed
Corrected off-by-one error in __init__
1 parent 7ddf501 commit e86f641

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_display_shapes/rect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ def __init__(self, x, y, width, height, *, fill=None, outline=None, stroke=1):
6969
for w in range(width):
7070
for line in range(stroke):
7171
self._bitmap[w, line] = 1
72-
self._bitmap[w, height - 1 - line] = 1
72+
self._bitmap[w, height - line] = 1
7373
for _h in range(height):
7474
for line in range(stroke):
7575
self._bitmap[line, _h] = 1
76-
self._bitmap[width - 1 - line, _h] = 1
76+
self._bitmap[width - line, _h] = 1
7777

7878
if fill is not None:
7979
self._palette[0] = fill

0 commit comments

Comments
 (0)