]>
git.saurik.com Git - wxWidgets.git/blob - src/qt/region.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "region.h"
16 #include "wx/region.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class wxRegionRefData
: public wxObjectRefData
26 wxRegionRefData(void);
27 ~wxRegionRefData(void);
33 wxRegionRefData::wxRegionRefData(void)
37 wxRegionRefData::~wxRegionRefData(void)
41 //-----------------------------------------------------------------------------
43 #define M_REGIONDATA ((wxRegionRefData *)m_refData)
45 IMPLEMENT_DYNAMIC_CLASS(wxRegion
,wxGDIObject
);
47 wxRegion::wxRegion( long x
, long y
, long w
, long h
)
49 m_refData
= new wxRegionRefData();
52 wxRegion::wxRegion( const wxPoint
& topLeft
, const wxPoint
& bottomRight
)
54 m_refData
= new wxRegionRefData();
57 wxRegion::wxRegion( const wxRect
& rect
)
59 m_refData
= new wxRegionRefData();
62 wxRegion::wxRegion(void)
64 m_refData
= new wxRegionRefData();
67 wxRegion::~wxRegion(void)
71 void wxRegion::Clear(void)
74 m_refData
= new wxRegionRefData();
77 bool wxRegion::Union( long x
, long y
, long width
, long height
)
82 bool wxRegion::Union( const wxRect
& rect
)
87 bool wxRegion::Union( const wxRegion
& region
)
92 bool wxRegion::Intersect( long x
, long y
, long width
, long height
)
97 bool wxRegion::Intersect( const wxRect
& rect
)
102 bool wxRegion::Intersect( const wxRegion
& region
)
107 bool wxRegion::Subtract( long x
, long y
, long width
, long height
)
112 bool wxRegion::Subtract( const wxRect
& rect
)
117 bool wxRegion::Subtract( const wxRegion
& region
)
122 bool wxRegion::Xor( long x
, long y
, long width
, long height
)
127 bool wxRegion::Xor( const wxRect
& rect
)
132 bool wxRegion::Xor( const wxRegion
& region
)
137 void wxRegion::GetBox( long& x
, long& y
, long&w
, long &h
) const
145 wxRect
wxRegion::GetBox(void) const
147 return wxRect( 0, 0, -1, -1 );
150 bool wxRegion::Empty(void) const
154 wxRegionContain
wxRegion::Contains( long x
, long y
) const
159 wxRegionContain
wxRegion::Contains( long x
, long y
, long w
, long h
) const