From ef42749294b2ac392f1a73fd2eb9ff49c76c404d Mon Sep 17 00:00:00 2001 From: Lorenzo Nebolosi <37691486+lorenzonebolosi@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:22:00 +0100 Subject: [PATCH] float -> int DrawRectangle and DrawRoundedRectangle requires ints instead of floats --- wx/lib/ogl/basic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py index 37341ab7..5f31cfa3 100644 --- a/wx/lib/ogl/basic.py +++ b/wx/lib/ogl/basic.py @@ -2756,9 +2756,9 @@ class RectangleShape(Shape): dc.SetPen(TransparentPen) if self._cornerRadius: - dc.DrawRoundedRectangle(x1 + self._shadowOffsetX, y1 + self._shadowOffsetY, self._width, self._height, self._cornerRadius) + dc.DrawRoundedRectangle(int(x1 + self._shadowOffsetX), int(y1 + self._shadowOffsetY), int(self._width), int(self._height), self._cornerRadius) else: - dc.DrawRectangle(x1 + self._shadowOffsetX, y1 + self._shadowOffsetY, self._width, self._height) + dc.DrawRectangle(int(x1 + self._shadowOffsetX), int(y1 + self._shadowOffsetY), int(self._width), int(self._height)) if self._pen: if self._pen.GetWidth() == 0: @@ -2769,9 +2769,9 @@ class RectangleShape(Shape): dc.SetBrush(self._brush) if self._cornerRadius: - dc.DrawRoundedRectangle(int(x1), int(y1), self._width, self._height, self._cornerRadius) + dc.DrawRoundedRectangle(int(x1), int(y1), int(self._width), int(self._height), self._cornerRadius) else: - dc.DrawRectangle(int(x1), int(y1), self._width, self._height) + dc.DrawRectangle(int(x1), int(y1), int(self._width), int(self._height)) def GetBoundingBoxMin(self): """Get the bounding box minimum."""