Skip to content

Commit 52838f3

Browse files
authored
Merge pull request #22 from lucashadfield/fill-triangle-fix
Fixed bug in fill_triangle for flat topped triangles
2 parents 0a590ae + 8a68766 commit 52838f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_gfx/gfx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def fill_triangle(self, x0, y0, x1, y1, x2, y2, *args, **kwargs):
276276
dy12 = 1
277277
sa = 0
278278
sb = 0
279-
if y1 == y2:
279+
if y1 == y2 or y0 == y1: # pylint: disable=consider-using-in
280280
last = y1
281281
else:
282282
last = y1 - 1

0 commit comments

Comments
 (0)