Don't use wx.TheFontList.FindOrCreateFont, it's way too slow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -201,18 +201,19 @@ class Renderer:
|
|||||||
|
|
||||||
def getCurrentFont(self):
|
def getCurrentFont(self):
|
||||||
font = self.fonts[-1]
|
font = self.fonts[-1]
|
||||||
return wx.TheFontList.FindOrCreateFont(font.get("size", self.defaultSize),
|
return wx.Font(font.get("size", self.defaultSize),
|
||||||
font.get("family", self.defaultFamily),
|
font.get("family", self.defaultFamily),
|
||||||
font.get("style", self.defaultStyle),
|
font.get("style", self.defaultStyle),
|
||||||
font.get("weight",self.defaultWeight),
|
font.get("weight",self.defaultWeight),
|
||||||
encoding = font.get("encoding", self.defaultEncoding))
|
False, "",
|
||||||
|
font.get("encoding", self.defaultEncoding))
|
||||||
|
|
||||||
def getCurrentColor(self):
|
def getCurrentColor(self):
|
||||||
font = self.fonts[-1]
|
font = self.fonts[-1]
|
||||||
return wx.TheColourDatabase.FindColour(font.get("color", self.defaultColor))
|
return wx.TheColourDatabase.FindColour(font.get("color", self.defaultColor))
|
||||||
|
|
||||||
def getCurrentPen(self):
|
def getCurrentPen(self):
|
||||||
return wx.ThePenList.FindOrCreatePen(self.getCurrentColor(), 1, wx.SOLID)
|
return wx.Pen(self.getCurrentColor(), 1, wx.SOLID)
|
||||||
|
|
||||||
def renderCharacterData(self, data, x, y):
|
def renderCharacterData(self, data, x, y):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
Reference in New Issue
Block a user