]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/region.cpp
remove unnecessary GTK declarations from defs.h, move things only used once to the...
[wxWidgets.git] / src / osx / carbon / region.cpp
index 448ae707a915f72ff016d88702a22a642400eb05..6f703117daaba22e0b2df47b7565574ec5a6de06 100644 (file)
@@ -16,6 +16,7 @@
 
 #ifndef WX_PRECOMP
     #include "wx/gdicmn.h"
+    #include "wx/dcmemory.h"
 #endif
 
 #include "wx/osx/private.h"
@@ -89,8 +90,8 @@ wxRegion::wxRegion(long x, long y, long w, long h)
 wxRegion::wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight)
 {
     m_refData = new wxRegionRefData(topLeft.x , topLeft.y ,
-                                    topLeft.x - bottomRight.x ,
-                                    topLeft.y - bottomRight.y);
+                                    bottomRight.x - topLeft.x,
+                                    bottomRight.y - topLeft.y);
 }
 
 wxRegion::wxRegion(const wxRect& rect)
@@ -247,7 +248,7 @@ bool wxRegion::DoIsEqual(const wxRegion& region) const
     // There doesn't seem to be any native function for checking the equality
     // of HIShapes so we compute their differences to determine if they are
     // equal.
-    wxRegion r(this);
+    wxRegion r(*this);
     r.Subtract(region);
 
     if ( !r.IsEmpty() )