]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/region.mm
fix for a warning in DLL build (patch 966823)
[wxWidgets.git] / src / cocoa / region.mm
CommitLineData
53dbce23
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: cocoa/region.mm
3// Purpose: wxRegion class
4// Author: David Elliott
5// Modified by:
6// Created: 2004/04/12
7// RCS-ID: $Id$
8// Copyright: (c) 2004 David Elliott
065e208e 9// Licence: wxWidgets licence
53dbce23
DE
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/region.h"
13
e9ec987a
DE
14#import <Foundation/NSGeometry.h>
15
53dbce23
DE
16IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject);
17
e9ec987a
DE
18inline wxRect NSRectToWxRect(const NSRect& rect)
19{
20 return wxRect((wxCoord)rect.origin.x, (wxCoord)rect.origin.y,
21 (wxCoord)rect.size.width, (wxCoord)rect.size.height);
22}
23
24wxRegion::wxRegion(const NSRect& rect)
25{
26 Union(NSRectToWxRect(rect));
27}
28
29wxRegion::wxRegion(const NSRect *rects, int count)
30{
31 for(int i=0; i<count; i++)
32 {
33 Union(NSRectToWxRect(rects[i]));
34 }
35}
36