]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/region.cpp
update docs, add to class list
[wxWidgets.git] / src / mac / carbon / region.cpp
index a03e1515ba6d0c3a49838fab07689b8de09d15b8..aefaa806930ece47ecf515dfdb3dd78a2e661898 100644 (file)
@@ -95,7 +95,7 @@ wxRegion::wxRegion(size_t n, const wxPoint *points, int WXUNUSED(fillStyle))
     x2 = x1 = points[0].x ;
     y2 = y1 = points[0].y ;
     ::MoveTo(x1,y1);
-    for (int i = 1; i < n; i++)
+    for (size_t i = 1; i < n; i++)
     {
         x2 = points[i].x ;
         y2 = points[i].y ;
@@ -128,6 +128,22 @@ void wxRegion::Clear()
     UnRef();
 }
 
+// Move the region
+bool wxRegion::Offset(wxCoord x, wxCoord y)
+{
+    wxCHECK_MSG( M_REGION, false, _T("invalid wxRegion") );
+
+    if ( !x && !y )
+    {
+        // nothing to do
+        return true;
+    }
+
+    OffsetRgn( M_REGION , x , y ) ;
+    return true ;
+}
+
+
 //! Combine rectangle (x, y, w, h) with this.
 bool wxRegion::Combine(long x, long y, long width, long height, wxRegionOp op)
 {