1
/////////////////////////////////////////////////////////////////////////////
3
// Purpose: SWIG interface defs for wxImageList and releated classes
7
// Created: 7-July-1997
8
// RCS-ID: $Id: _region.i 63143 2010-01-14 03:08:17Z RD $
9
// Copyright: (c) 2003 by Total Control Software
10
// Licence: wxWindows license
11
/////////////////////////////////////////////////////////////////////////////
16
//---------------------------------------------------------------------------
21
//---------------------------------------------------------------------------
33
// // these constants are used with wxRegion::Combine() in the ports which have
37
// // Creates the intersection of the two combined regions.
40
// // Creates a copy of the region
43
// // Combines the parts of first region that are not in the second one
46
// // Creates the union of two combined regions.
49
// // Creates the union of two regions except for any overlapping areas.
55
MustHaveApp(wxRegion);
57
class wxRegion : public wxGDIObject {
59
wxRegion(wxCoord x=0, wxCoord y=0, wxCoord width=0, wxCoord height=0);
60
%RenameCtor(RegionFromBitmap, wxRegion(const wxBitmap& bmp));
61
%RenameCtor(RegionFromBitmapColour, wxRegion(const wxBitmap& bmp,
62
const wxColour& transColour,
64
%RenameCtor(RegionFromPoints, wxRegion(int points, wxPoint* points_array,
65
wxPolygonFillMode fillStyle = wxWINDING_RULE));
71
bool Offset(wxCoord x, wxCoord y);
73
wxRegionContain Contains(wxCoord x, wxCoord y);
74
%Rename(ContainsPoint, wxRegionContain, Contains(const wxPoint& pt));
75
%Rename(ContainsRect, wxRegionContain, Contains(const wxRect& rect));
76
%Rename(ContainsRectDim, wxRegionContain, Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h));
80
bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
81
%Rename(IntersectRect, bool, Intersect(const wxRect& rect));
82
%Rename(IntersectRegion, bool, Intersect(const wxRegion& region));
86
// Is region equal (i.e. covers the same area as another one)?
87
bool IsEqual(const wxRegion& region) const;
89
bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
90
%Rename(UnionRect, bool, Union(const wxRect& rect));
91
%Rename(UnionRegion, bool, Union(const wxRegion& region));
93
bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
94
%Rename(SubtractRect, bool, Subtract(const wxRect& rect));
95
%Rename(SubtractRegion, bool, Subtract(const wxRegion& region));
97
bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
98
%Rename(XorRect, bool, Xor(const wxRect& rect));
99
%Rename(XorRegion, bool, Xor(const wxRegion& region));
101
// Convert the region to a B&W bitmap with the white pixels being inside
103
wxBitmap ConvertToBitmap();
105
// Use the non-transparent pixels of a wxBitmap for the region to combine
106
// with this region. If the bitmap has a mask then it will be used,
107
// otherwise the colour to be treated as transparent may be specified,
108
// along with an optional tolerance value.
109
%Rename(UnionBitmap, bool, Union(const wxBitmap& bmp));
110
%Rename(UnionBitmapColour, bool, Union(const wxBitmap& bmp,
111
const wxColour& transColour,
115
// bool Combine(wxCoord x, wxCoord y, wxCoord w, wxCoord h, wxRegionOp op);
116
// %Rename(CombineRect, bool , Combine(const wxRect& rect, wxRegionOp op));
117
// %Rename(CombineRegion, bool , Combine(const wxRegion& region, wxRegionOp op));
119
%property(Box, GetBox, doc="See `GetBox`");
124
MustHaveApp(wxRegionIterator);
126
class wxRegionIterator : public wxObject {
128
wxRegionIterator(const wxRegion& region);
147
return self->operator bool();
151
%property(H, GetH, doc="See `GetH`");
152
%property(Height, GetHeight, doc="See `GetHeight`");
153
%property(Rect, GetRect, doc="See `GetRect`");
154
%property(W, GetW, doc="See `GetW`");
155
%property(Width, GetWidth, doc="See `GetWidth`");
156
%property(X, GetX, doc="See `GetX`");
157
%property(Y, GetY, doc="See `GetY`");
162
//---------------------------------------------------------------------------
163
//---------------------------------------------------------------------------