]> git.saurik.com Git - wxWidgets.git/commitdiff
Expose SetClippingRegion(point, size)
authorRobin Dunn <robin@alldunn.com>
Fri, 28 Nov 2003 18:42:44 +0000 (18:42 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 28 Nov 2003 18:42:44 +0000 (18:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/ColourDB.py
wxPython/demo/wxDragImage.py
wxPython/docs/MigrationGuide.txt
wxPython/src/_dc.i
wxPython/wx/lib/rightalign.py

index e07a27bf27bc00b0ee63ad52ab7396e1bc77b822..ad7c92fc744aeaa24036cfa54df3604ecc416539 100644 (file)
@@ -57,7 +57,7 @@ class TestWindow(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)
 
 
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)
 
 
index 638e5cc9b393e2c2105f30c5dbcbe450ac3baaa4..09d29d29626c299508bf3b71110dcb2cf7cc7d4a 100644 (file)
@@ -275,6 +275,11 @@ that are affected are listed here::
     Blit(destPt, size, sourceDC, srcPt,
          rop = wxCOPY, useMask = FALSE, srcPtMask = wx.DefaultPosition)
 
+    SetClippingRegionXY SetClippingRegion(x, y, width, height)
+    SetClippingRegion(point, size)
+    SetClippingRect(rect)
+    SetClippingRegionAsRegion(region);
+
        
 If you have code that draws on a DC you **will** get errors because of
 these changes, but it should be easy to fix the code.  You can either
index da92e4ada93f371a5fbca894d98d4c888c504523..4b4034bcb31a3d6602db3b35fae2691fadee522e 100644 (file)
@@ -219,8 +219,8 @@ public:
     // clipping region
     // ---------------
 
-    void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-    //void SetClippingRegion(const wxPoint& pt, const wxSize& sz)
+    %name(SetClippingRegionXY)void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+    void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
     %name(SetClippingRect) void SetClippingRegion(const wxRect& rect);
     %name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
 
index fc9fd17e6e024e308a05fa237363f597b3526906..2a485134dd0506fd1c1a987c959b262a419a8465 100644 (file)
@@ -61,7 +61,7 @@ class wxRightTextCtrl(wxTextCtrl):
             fclr = wxSystemSettings_GetColour(wxSYS_COLOUR_GRAYTEXT)
         dc.SetTextForeground(fclr)
 
-        dc.SetClippingRegion(0, 0, dcwidth, dcheight)
+        dc.SetClippingRegionXY(0, 0, dcwidth, dcheight)
         dc.DrawText(text, x, y)
 
         if x < 0: