]> git.saurik.com Git - wxWidgets.git/commitdiff
Some wx.* fixes
authorRobin Dunn <robin@alldunn.com>
Tue, 9 Dec 2003 02:27:08 +0000 (02:27 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 9 Dec 2003 02:27:08 +0000 (02:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/Threads.py

index 6d9f5a1d5be8ded3565991aa99f3c9000e0b38df..bd4385707a6e6c29b5c71c6d9681794a6f69f95a 100644 (file)
@@ -108,7 +108,7 @@ class GraphWindow(wx.Window):
         dc.SetTextForeground(wx.BLUE)
         dc.SetBackground(wx.Brush(self.GetBackgroundColour()))
         dc.Clear()
-        dc.SetPen(wxPen(wxBLACK, 3, wxSOLID))
+        dc.SetPen(wx.Pen(wx.BLACK, 3, wx.SOLID))
         dc.DrawLine((self.linePos, 0), (self.linePos, size.height-10))
 
         bh = ypos = self.barHeight
@@ -118,8 +118,8 @@ class GraphWindow(wx.Window):
 
             if val:
                 color = self.colors[ x % len(self.colors) ]
-                dc.SetPen(wxPen(color))
-                dc.SetBrush(wxBrush(color))
+                dc.SetPen(wx.Pen(color))
+                dc.SetBrush(wx.Brush(color))
                 dc.DrawRectangle((self.linePos+3, ypos), (val, bh))
 
             ypos = ypos + 2*bh
@@ -128,13 +128,14 @@ class GraphWindow(wx.Window):
 
 
     def OnPaint(self, evt):
-        width, height = self.GetSize()
+        width, height = size =self.GetSize()
         bmp = wx.EmptyBitmap(width, height)
 
         dc = wx.MemoryDC()
         dc.SelectObject(bmp)
 
-        self.Draw(dc, (width, height))
+        
+        self.Draw(dc, size)
 
         wdc = wx.PaintDC(self)
         wdc.BeginDrawing()