Skip to content

Commit b7ea57b

Browse files
imsWanWizard
authored andcommitted
Canvas - sanity fix – cast draw parameters to int (Python 3 stricter than Py2)
1 parent 174f978 commit b7ea57b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/python/Components/Renderer/Canvas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ def draw(self, list):
3535
elif l[0] == 2:
3636
self.instance.writeText(eRect(l[1], l[2], l[3], l[4]), gRGB(l[5]), gRGB(l[6]), l[7], l[8], l[9])
3737
elif l[0] == 3:
38-
self.instance.drawLine(l[1], l[2], l[3], l[4], gRGB(l[5]))
38+
self.instance.drawLine(int(l[1]), int(l[2]), int(l[3]), int(l[4]), gRGB(l[5]))
3939
elif l[0] == 4:
40-
self.instance.drawRotatedLine(l[1], l[2], l[3], l[4], l[5], l[6], l[7], l[8], gRGB(l[9]))
40+
self.instance.drawRotatedLine(int(l[1]), int(l[2]), int(l[3]), int(l[4]), int(l[5]), int(l[6]), l[7], l[8], gRGB(l[9]))
4141
else:
4242
print("drawlist entry:", l)
4343
raise RuntimeError("invalid drawlist entry")

0 commit comments

Comments
 (0)