Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d749c5

Browse files
authored
Merge pull request#19395 from QuLogic/wx-py310
2 parents603cf1a +be40c5c commit0d749c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎lib/matplotlib/backends/backend_wx.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,11 @@ def get_wx_font(self, s, prop):
297297
font=self.fontd.get(key)
298298
iffontisnotNone:
299299
returnfont
300+
size=self.points_to_pixels(prop.get_size_in_points())
300301
# Font colour is determined by the active wx.Pen
301302
# TODO: It may be wise to cache font information
302303
self.fontd[key]=font=wx.Font(# Cache the font and gc.
303-
pointSize=self.points_to_pixels(prop.get_size_in_points()),
304+
pointSize=int(size+0.5),
304305
family=self.fontnames.get(prop.get_name(),wx.ROMAN),
305306
style=self.fontangles[prop.get_style()],
306307
weight=self.fontweights[prop.get_weight()])
@@ -567,7 +568,7 @@ def start_event_loop(self, timeout=0):
567568
raiseRuntimeError("Event loop already running")
568569
timer=wx.Timer(self,id=wx.ID_ANY)
569570
iftimeout>0:
570-
timer.Start(timeout*1000,oneShot=True)
571+
timer.Start(int(timeout*1000),oneShot=True)
571572
self.Bind(wx.EVT_TIMER,self.stop_event_loop,id=timer.GetId())
572573
# Event loop handler for start/stop event loop
573574
self._event_loop=wx.GUIEventLoop()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp