1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface defs for wxImageList and releated classes
7 // Created: 7-July-1997
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
21 //---------------------------------------------------------------------------
23 %typemap(in) (int points, wxPoint* points_array ) {
24 $2 = wxPoint_LIST_helper($input, &$1);
25 if ($2 == NULL) SWIG_fail;
27 %typemap(freearg) (int points, wxPoint* points_array ) {
31 //---------------------------------------------------------------------------
44 class wxRegion : public wxGDIObject {
46 wxRegion(wxCoord x=0, wxCoord y=0, wxCoord width=0, wxCoord height=0);
47 %name(RegionFromBitmap)wxRegion(const wxBitmap& bmp,
48 const wxColour& transColour = wxNullColour,
51 %name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
52 int fillStyle = wxWINDING_RULE);
55 %name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
56 int fillStyle = wxWINDING_RULE) {
57 wxPyRaiseNotImplemented();
68 bool Offset(wxCoord x, wxCoord y);
71 wxRegionContain Contains(wxCoord x, wxCoord y);
72 %name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt);
73 %name(ContainsRect)wxRegionContain Contains(const wxRect& rect);
74 %name(ContainsRectDim)wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
78 bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
79 %name(IntersectRect)bool Intersect(const wxRect& rect);
80 %name(IntersectRegion)bool Intersect(const wxRegion& region);
84 bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
85 %name(UnionRect)bool Union(const wxRect& rect);
86 %name(UnionRegion)bool Union(const wxRegion& region);
88 bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
89 %name(SubtractRect)bool Subtract(const wxRect& rect);
90 %name(SubtractRegion)bool Subtract(const wxRegion& region);
92 bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
93 %name(XorRect)bool Xor(const wxRect& rect);
94 %name(XorRegion)bool Xor(const wxRegion& region);
96 // Convert the region to a B&W bitmap with the white pixels being inside
98 wxBitmap ConvertToBitmap();
100 // Use the non-transparent pixels of a wxBitmap for the region to combine
101 // with this region. If the bitmap has a mask then it will be used,
102 // otherwise the colour to be treated as transparent may be specified,
103 // along with an optional tolerance value.
104 %name(UnionBitmap)bool Union(const wxBitmap& bmp,
105 const wxColour& transColour = wxNullColour,
111 class wxRegionIterator : public wxObject {
113 wxRegionIterator(const wxRegion& region);
132 return self->operator bool();
139 //---------------------------------------------------------------------------
140 //---------------------------------------------------------------------------