From 0f57ad41056d9b5fcb1cfc6276197c3e9e63b1f9 Mon Sep 17 00:00:00 2001 From: amarinoICEg Date: Wed, 4 Dec 2024 12:01:00 +0100 Subject: [PATCH] casting drawrectangle arguments to int as required --- wx/lib/ogl/lines.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wx/lib/ogl/lines.py b/wx/lib/ogl/lines.py index 8c1308c1..8ebe633b 100644 --- a/wx/lib/ogl/lines.py +++ b/wx/lib/ogl/lines.py @@ -971,8 +971,8 @@ class LineShape(Shape): # Drawing over the line only seems to work if the line has a thickness # of 1. if old_pen and old_pen.GetWidth() > 1: - dc.DrawRectangle(self._xpos - bound_x / 2.0 - 2, self._ypos - bound_y / 2.0 - 2, - bound_x + 4, bound_y + 4) + dc.DrawRectangle(int(self._xpos - bound_x / 2.0 - 2), int(self._ypos - bound_y / 2.0 - 2), + int(bound_x + 4), int(bound_y + 4)) else: self._erasing = True self.GetEventHandler().OnDraw(dc)