X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9156f27cbae786cf57edd65b6d3db5443c81640a..2289dcea2ba6b6c1ef9dd9076fb9c632fe009f89:/src/mac/carbon/region.cpp diff --git a/src/mac/carbon/region.cpp b/src/mac/carbon/region.cpp index c1ef0182d4..f0054d35bc 100644 --- a/src/mac/carbon/region.cpp +++ b/src/mac/carbon/region.cpp @@ -8,10 +8,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "region.h" #endif +#include "wx/wxprec.h" + #include "wx/region.h" #include "wx/gdicmn.h" #include "wx/mac/uma.h" @@ -128,6 +130,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) {