]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxDragImage.py
Expose SetClippingRegion(point, size)
[wxWidgets.git] / wxPython / demo / wxDragImage.py
index 8506fb72006003552128407a255d709fb46e58f7..4c348637cf03558f062e703dcd43537451e9a589 100644 (file)
@@ -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)