From f58030d91c9435ba51d120d6623d8177441cd0cb Mon Sep 17 00:00:00 2001 From: Tomas Zigo Date: Sun, 24 Sep 2023 07:25:12 +0200 Subject: [PATCH 1/2] wxGUI/mapswipe: fix saving display to file --- gui/wxpython/mapwin/buffered.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/wxpython/mapwin/buffered.py b/gui/wxpython/mapwin/buffered.py index 761ae7a9de1..6f7f918af3e 100644 --- a/gui/wxpython/mapwin/buffered.py +++ b/gui/wxpython/mapwin/buffered.py @@ -511,9 +511,11 @@ def Draw( pdc.SetTextBackground(img["background"]) coords, bbox = self.TextBounds(img) if rotation == 0: - pdc.DrawText(img["text"], coords[0], coords[1]) + pdc.DrawText(img["text"], int(coords[0]), int(coords[1])) else: - pdc.DrawRotatedText(img["text"], coords[0], coords[1], rotation) + pdc.DrawRotatedText( + img["text"], int(coords[0]), int(coords[1]), rotation + ) pdc.SetIdBounds(drawid, bbox) pdc.EndDrawing() From 960144610874e9c328a24c70c53319e35f4ad17e Mon Sep 17 00:00:00 2001 From: Tomas Zigo Date: Tue, 26 Sep 2023 15:00:55 +0200 Subject: [PATCH 2/2] wxGUI/psmap: fix wx.adv.PseudoDC() class DrawRotatedText() method x, y param arg int type --- gui/wxpython/psmap/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/wxpython/psmap/frame.py b/gui/wxpython/psmap/frame.py index a71798180b3..4913671e2dd 100644 --- a/gui/wxpython/psmap/frame.py +++ b/gui/wxpython/psmap/frame.py @@ -2526,7 +2526,7 @@ def DrawRotText(self, pdc, drawId, textDict, coords, bounds): if rot == 0: pdc.DrawLabel(text=textDict["text"], rect=bounds) else: - pdc.DrawRotatedText(textDict["text"], coords[0], coords[1], rot) + pdc.DrawRotatedText(textDict["text"], int(coords[0]), int(coords[1]), rot) pdc.SetIdBounds(drawId, Rect(*bounds)) self.Refresh()