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 MustHaveApp(wxRegion);
46 class wxRegion : public wxGDIObject {
48 wxRegion(wxCoord x=0, wxCoord y=0, wxCoord width=0, wxCoord height=0);
49 %name(RegionFromBitmap)wxRegion(const wxBitmap& bmp);
50 %name(RegionFromBitmapColour)wxRegion(const wxBitmap& bmp,
51 const wxColour& transColour,
53 %name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
54 int fillStyle = wxWINDING_RULE);
60 bool Offset(wxCoord x, wxCoord y);
62 wxRegionContain Contains(wxCoord x, wxCoord y);
63 %name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt);
64 %name(ContainsRect)wxRegionContain Contains(const wxRect& rect);
65 %name(ContainsRectDim)wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
69 bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
70 %name(IntersectRect)bool Intersect(const wxRect& rect);
71 %name(IntersectRegion)bool Intersect(const wxRegion& region);
75 bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
76 %name(UnionRect)bool Union(const wxRect& rect);
77 %name(UnionRegion)bool Union(const wxRegion& region);
79 bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
80 %name(SubtractRect)bool Subtract(const wxRect& rect);
81 %name(SubtractRegion)bool Subtract(const wxRegion& region);
83 bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
84 %name(XorRect)bool Xor(const wxRect& rect);
85 %name(XorRegion)bool Xor(const wxRegion& region);
87 // Convert the region to a B&W bitmap with the white pixels being inside
89 wxBitmap ConvertToBitmap();
91 // Use the non-transparent pixels of a wxBitmap for the region to combine
92 // with this region. If the bitmap has a mask then it will be used,
93 // otherwise the colour to be treated as transparent may be specified,
94 // along with an optional tolerance value.
95 %name(UnionBitmap)bool Union(const wxBitmap& bmp);
96 %name(UnionBitmapColour)bool Union(const wxBitmap& bmp,
97 const wxColour& transColour,
103 MustHaveApp(wxRegionIterator);
105 class wxRegionIterator : public wxObject {
107 wxRegionIterator(const wxRegion& region);
126 return self->operator bool();
133 //---------------------------------------------------------------------------
134 //---------------------------------------------------------------------------