X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/53dbce233842a3d986e33e6b83a36ce34fd5ae23..df74fdeafdf63821d9740dda8f52415421729700:/src/cocoa/region.mm diff --git a/src/cocoa/region.mm b/src/cocoa/region.mm index 170ef49b6f..04f2c15fe0 100644 --- a/src/cocoa/region.mm +++ b/src/cocoa/region.mm @@ -11,5 +11,26 @@ #include "wx/region.h" +#import + IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject); +inline wxRect NSRectToWxRect(const NSRect& rect) +{ + return wxRect((wxCoord)rect.origin.x, (wxCoord)rect.origin.y, + (wxCoord)rect.size.width, (wxCoord)rect.size.height); +} + +wxRegion::wxRegion(const NSRect& rect) +{ + Union(NSRectToWxRect(rect)); +} + +wxRegion::wxRegion(const NSRect *rects, int count) +{ + for(int i=0; i