summaryrefslogtreecommitdiff
path: root/wasp
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-27 18:18:14 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-27 18:18:14 (GMT)
commitb7c622c03d360975eb4337414fe0c80abae2649b (patch)
treebe4d0c50b05a5904bad6a21be439a40bd794cd61 /wasp
parent6d3f2126bf0bcf728f24a447ec5edb7834473145 (diff)
draw565: fix width handling for vertical and horizontal lines
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp')
-rw-r--r--wasp/draw565.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wasp/draw565.py b/wasp/draw565.py
index 92d39f6..2bb72ba 100644
--- a/wasp/draw565.py
+++ b/wasp/draw565.py
@@ -395,8 +395,8 @@ class Draw565(object):
if x1 < x0 or y1 < y0:
x0, x1 = x1, x0
y0, y1 = y1, y0
- w = width if dx == 0 else dx
- h = width if dy == 0 else -dy
+ w = width if dx == 0 else (dx + width - 1)
+ h = width if dy == 0 else (-dy + width - 1)
self.fill(color, x0, y0, w, h)
return
while True: