X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd3f2efe791cf99c2e4944cd615f02a5502ed93e..ed8e1ecb3fdabbbe5062ebba2a50a2bc8d1e2c76:/wxPython/demo/wxDragImage.py diff --git a/wxPython/demo/wxDragImage.py b/wxPython/demo/wxDragImage.py index 8506fb7200..4c348637cf 100644 --- a/wxPython/demo/wxDragImage.py +++ b/wxPython/demo/wxDragImage.py @@ -137,7 +137,7 @@ class DragCanvas(wxScrolledWindow): def EraseShape(self, shape, dc): r = shape.GetRect() - dc.SetClippingRegion(r.x, r.y, r.width, r.height) + dc.SetClippingRect(r) self.TileBackground(dc) self.DrawShapes(dc) dc.DestroyClippingRegion() @@ -148,7 +148,7 @@ class DragCanvas(wxScrolledWindow): if not dc: dc = wxClientDC(self) rect = self.GetUpdateRegion().GetBox() - dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height) + dc.SetClippingRect(rect) self.TileBackground(dc)