]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/region.tex
more wxConfig and xwLog docs (sorry for the delay)
[wxWidgets.git] / docs / latex / wx / region.tex
CommitLineData
a660d684
KB
1\section{\class{wxRegion}}\label{wxregion}
2
3A wxRegion represents a simple or complex region on a device context or window. It uses
4reference counting, so copying and assignment operations are fast.
5
6\wxheading{Derived from}
7
8\helpref{wxGDIObject}{wxgdiobject}\\
9\helpref{wxObject}{wxobject}
10
11\latexignore{\rtfignore{\wxheading{Members}}}
12
13\membersection{wxRegion::wxRegion}\label{wxregionconstr}
14
15\func{}{wxRegion}{\void}
16
17Default constructor.
18
19\func{}{wxRegion}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
20
21Constructs a rectangular region with the given position and size.
22
23\func{}{wxRegion}{\param{const wxPoint\&}{ topLeft}, \param{const wxPoint\&}{ bottomRight}}
24
25Constructs a rectangular region from the top left point and the bottom right point.
26
27\func{}{wxRegion}{\param{const wxRect\&}{ rect}}
28
29Constructs a rectangular region a wxRect object.
30
31\func{}{wxRegion}{\param{const wxRegion\&}{ region}}
32
33Constructs a region by copying another region.
34
35\membersection{wxRegion::\destruct{wxRegion}}
36
37\func{}{\destruct{wxRegion}}{\void}
38
39Destructor.
40
41\membersection{wxRegion::Clear}\label{wxregionclear}
42
43\func{void}{Clear}{\void}
44
45Clears the current region.
46
47\membersection{wxRegion::Contains}\label{wxregioncontains}
48
49\constfunc{wxRegionContain}{Contains}{\param{long\& }{x}, \param{long\& }{y}}
50
51Returns a value indicating whether the given point is contained within the region.
52
53\constfunc{wxRegionContain}{Contains}{\param{const wxPoint\&}{ pt}}
54
55Returns a value indicating whether the given point is contained within the region.
56
57\constfunc{wxRegionContain}{Contains}{\param{long\& }{x}, \param{long\& }{y}, \param{long\& }{width}, \param{long\& }{height}}
58
59Returns a value indicating whether the given rectangle is contained within the region.
60
61\constfunc{wxRegionContain}{Contains}{\param{const wxRect\& }{rect}}
62
63Returns a value indicating whether the given rectangle is contained within the region.
64
65\wxheading{Return value}
66
67The return value is one of wxOutRegion, wxPartRegion and wxInRegion.
68
69On Windows, only wxOutRegion and wxInRegion are returned; a value wxInRegion then indicates that
70all or some part of the region is contained in this region.
71
72\membersection{wxRegion::GetBox}\label{wxregiongetbox}
73
74\constfunc{void}{GetBox}{\param{long\& }{x}, \param{long\& }{y}, \param{long\& }{width}, \param{long\& }{height}}
75
76Returns the outer bounds of the region.
77
78\constfunc{wxRect}{GetBox}{\void}
79
80Returns the outer bounds of the region.
81
82\membersection{wxRegion::Intersect}\label{wxregionintersect}
83
84\func{bool}{Intersect}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
85
86Finds the intersection of this region and another, rectangular region, specified using position and size.
87
88\func{bool}{Intersect}{\param{const wxRect\&}{ rect}}
89
90Finds the intersection of this region and another, rectangular region.
91
92\func{bool}{Intersect}{\param{const wxRegion\&}{ region}}
93
94Finds the intersection of this region and another region.
95
96\wxheading{Return value}
97
98TRUE if successful, FALSE otherwise.
99
100\wxheading{Remarks}
101
102Creates the intersection of the two regions, that is, the parts which are in both regions. The result
103is stored in this region.
104
105\membersection{wxRegion::IsEmpty}\label{wxregionisempty}
106
107\constfunc{bool}{IsEmpty}{\void}
108
109\func{bool}{IsEmpty}{\void}
110
111Returns TRUE if the region is empty, FALSE otherwise.
112
113\func{bool}{Subtract}{\param{const wxRect\&}{ rect}}
114
115Subtracts a rectangular region from this region.
116
117\func{bool}{Subtract}{\param{const wxRegion\&}{ region}}
118
119Subtracts a region from this region.
120
121\wxheading{Return value}
122
123TRUE if successful, FALSE otherwise.
124
125\wxheading{Remarks}
126
127This operation combines the parts of 'this' region that are not part of the second region.
128The result is stored in this region.
129
130\membersection{wxRegion::Union}\label{wxregionunion}
131
132\func{bool}{Union}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
133
134Finds the union of this region and another, rectangular region, specified using position and size.
135
136\func{bool}{Union}{\param{const wxRect\&}{ rect}}
137
138Finds the union of this region and another, rectangular region.
139
140\func{bool}{Union}{\param{const wxRegion\&}{ region}}
141
142Finds the union of this region and another region.
143
144\wxheading{Return value}
145
146TRUE if successful, FALSE otherwise.
147
148\wxheading{Remarks}
149
150This operation creates a region that combines all of this region and the second region.
151The result is stored in this region.
152
153\membersection{wxRegion::Xor}\label{wxregionxor}
154
155\func{bool}{Xor}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
156
157Finds the Xor of this region and another, rectangular region, specified using position and size.
158
159\func{bool}{Xor}{\param{const wxRect\&}{ rect}}
160
161Finds the Xor of this region and another, rectangular region.
162
163\func{bool}{Xor}{\param{const wxRegion\&}{ region}}
164
165Finds the Xor of this region and another region.
166
167\wxheading{Return value}
168
169TRUE if successful, FALSE otherwise.
170
171\wxheading{Remarks}
172
173This operation creates a region that combines all of this region and the second region, except
174for any overlapping areas. The result is stored in this region.
175
176\membersection{wxRegion::operator $=$}\label{wxregionassign}
177
178\func{void}{operator $=$}{\param{const wxRegion\&}{ region}}
179
180Copies {\it region} by reference counting.
181
182