X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2571247b80890796d1f26e181a8f955735031efc..9598655399a943ac6d75b1f4ab5c230cecd2ef43:/wxPython/samples/doodle/doodle.py diff --git a/wxPython/samples/doodle/doodle.py b/wxPython/samples/doodle/doodle.py index 117cf8e7fc..47e01d9e6d 100644 --- a/wxPython/samples/doodle/doodle.py +++ b/wxPython/samples/doodle/doodle.py @@ -71,7 +71,7 @@ class DoodleWindow(wx.Window): def InitBuffer(self): """Initialize the bitmap used for buffering the display.""" size = self.GetClientSize() - self.buffer = wx.EmptyBitmap(size.width, size.height) + self.buffer = wx.EmptyBitmap(max(1,size.width), max(1,size.height)) dc = wx.BufferedDC(None, self.buffer) dc.SetBackground(wx.Brush(self.GetBackgroundColour())) dc.Clear() @@ -174,7 +174,7 @@ class DoodleWindow(wx.Window): dc.BeginDrawing() dc.SetPen(self.pen) pos = event.GetPosition() - coords = (self.pos, pos) + coords = (self.pos.x, self.pos.y, pos.x, pos.y) self.curLine.append(coords) dc.DrawLine(*coords) self.pos = pos