]> git.saurik.com Git - wxWidgets.git/commitdiff
Use global font and pen to reduce GDI objects created. Patch #1540457
authorRobin Dunn <robin@alldunn.com>
Sat, 19 Aug 2006 19:22:23 +0000 (19:22 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 19 Aug 2006 19:22:23 +0000 (19:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/ogl/_basic.py

index 4ace078e4435960bed9b8ed49734a38ca6ed0ca8..db095dd16500e7ab2a562c1be31808a7dba4b395 100644 (file)
@@ -232,9 +232,9 @@ class Shape(ShapeEvtHandler):
         self._canvas = canvas
         self._xpos = 0.0
         self._ypos = 0.0
-        self._pen = wx.Pen(wx.BLACK, 1, wx.SOLID)
+        self._pen = BlackForegroundPen
         self._brush = wx.WHITE_BRUSH
-        self._font = wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL)
+        self._font = NormalFont
         self._textColour = wx.BLACK
         self._textColourName = wx.BLACK
         self._visible = False
@@ -276,7 +276,7 @@ class Shape(ShapeEvtHandler):
         # the region eventually (the duplication is for compatibility)
         region = ShapeRegion()
         region.SetName("0")
-        region.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
+        region.SetFont(NormalFont)
         region.SetFormatMode(FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT)
         region.SetColour("BLACK")
         self._regions.append(region)