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 //---------------------------------------------------------------------------
43 // // these constants are used with wxRegion::Combine() in the ports which have
47 // // Creates the intersection of the two combined regions.
50 // // Creates a copy of the region
53 // // Combines the parts of first region that are not in the second one
56 // // Creates the union of two combined regions.
59 // // Creates the union of two regions except for any overlapping areas.
65 MustHaveApp(wxRegion);
67 class wxRegion : public wxGDIObject {
69 wxRegion(wxCoord x=0, wxCoord y=0, wxCoord width=0, wxCoord height=0);
70 %RenameCtor(RegionFromBitmap, wxRegion(const wxBitmap& bmp));
71 %RenameCtor(RegionFromBitmapColour, wxRegion(const wxBitmap& bmp,
72 const wxColour& transColour,
74 %RenameCtor(RegionFromPoints, wxRegion(int points, wxPoint* points_array,
75 int fillStyle = wxWINDING_RULE));
81 bool Offset(wxCoord x, wxCoord y);
83 wxRegionContain Contains(wxCoord x, wxCoord y);
84 %Rename(ContainsPoint, wxRegionContain, Contains(const wxPoint& pt));
85 %Rename(ContainsRect, wxRegionContain, Contains(const wxRect& rect));
86 %Rename(ContainsRectDim, wxRegionContain, Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h));
90 bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
91 %Rename(IntersectRect, bool, Intersect(const wxRect& rect));
92 %Rename(IntersectRegion, bool, Intersect(const wxRegion& region));
96 // Is region equal (i.e. covers the same area as another one)?
97 bool IsEqual(const wxRegion& region) const;
99 bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
100 %Rename(UnionRect, bool, Union(const wxRect& rect));
101 %Rename(UnionRegion, bool, Union(const wxRegion& region));
103 bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
104 %Rename(SubtractRect, bool, Subtract(const wxRect& rect));
105 %Rename(SubtractRegion, bool, Subtract(const wxRegion& region));
107 bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
108 %Rename(XorRect, bool, Xor(const wxRect& rect));
109 %Rename(XorRegion, bool, Xor(const wxRegion& region));
111 // Convert the region to a B&W bitmap with the white pixels being inside
113 wxBitmap ConvertToBitmap();
115 // Use the non-transparent pixels of a wxBitmap for the region to combine
116 // with this region. If the bitmap has a mask then it will be used,
117 // otherwise the colour to be treated as transparent may be specified,
118 // along with an optional tolerance value.
119 %Rename(UnionBitmap, bool, Union(const wxBitmap& bmp));
120 %Rename(UnionBitmapColour, bool, Union(const wxBitmap& bmp,
121 const wxColour& transColour,
125 // bool Combine(wxCoord x, wxCoord y, wxCoord w, wxCoord h, wxRegionOp op);
126 // %Rename(CombineRect, bool , Combine(const wxRect& rect, wxRegionOp op));
127 // %Rename(CombineRegion, bool , Combine(const wxRegion& region, wxRegionOp op));
129 %property(Box, GetBox, doc="See `GetBox`");
134 MustHaveApp(wxRegionIterator);
136 class wxRegionIterator : public wxObject {
138 wxRegionIterator(const wxRegion& region);
157 return self->operator bool();
161 %property(H, GetH, doc="See `GetH`");
162 %property(Height, GetHeight, doc="See `GetHeight`");
163 %property(Rect, GetRect, doc="See `GetRect`");
164 %property(W, GetW, doc="See `GetW`");
165 %property(Width, GetWidth, doc="See `GetWidth`");
166 %property(X, GetX, doc="See `GetX`");
167 %property(Y, GetY, doc="See `GetY`");
172 //---------------------------------------------------------------------------
173 //---------------------------------------------------------------------------