]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/region.tex
Added Forty Thieves
[wxWidgets.git] / docs / latex / wx / region.tex
1 \section{\class{wxRegion}}\label{wxregion}
2
3 A wxRegion represents a simple or complex region on a device context or window. It uses
4 reference 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
17 Default constructor.
18
19 \func{}{wxRegion}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
20
21 Constructs a rectangular region with the given position and size.
22
23 \func{}{wxRegion}{\param{const wxPoint\&}{ topLeft}, \param{const wxPoint\&}{ bottomRight}}
24
25 Constructs a rectangular region from the top left point and the bottom right point.
26
27 \func{}{wxRegion}{\param{const wxRect\&}{ rect}}
28
29 Constructs a rectangular region a wxRect object.
30
31 \func{}{wxRegion}{\param{const wxRegion\&}{ region}}
32
33 Constructs a region by copying another region.
34
35 \membersection{wxRegion::\destruct{wxRegion}}
36
37 \func{}{\destruct{wxRegion}}{\void}
38
39 Destructor.
40
41 \membersection{wxRegion::Clear}\label{wxregionclear}
42
43 \func{void}{Clear}{\void}
44
45 Clears the current region.
46
47 \membersection{wxRegion::Contains}\label{wxregioncontains}
48
49 \constfunc{wxRegionContain}{Contains}{\param{long\& }{x}, \param{long\& }{y}}
50
51 Returns a value indicating whether the given point is contained within the region.
52
53 \constfunc{wxRegionContain}{Contains}{\param{const wxPoint\&}{ pt}}
54
55 Returns 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
59 Returns a value indicating whether the given rectangle is contained within the region.
60
61 \constfunc{wxRegionContain}{Contains}{\param{const wxRect\& }{rect}}
62
63 Returns a value indicating whether the given rectangle is contained within the region.
64
65 \wxheading{Return value}
66
67 The return value is one of wxOutRegion, wxPartRegion and wxInRegion.
68
69 On Windows, only wxOutRegion and wxInRegion are returned; a value wxInRegion then indicates that
70 all 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
76 Returns the outer bounds of the region.
77
78 \constfunc{wxRect}{GetBox}{\void}
79
80 Returns 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
86 Finds the intersection of this region and another, rectangular region, specified using position and size.
87
88 \func{bool}{Intersect}{\param{const wxRect\&}{ rect}}
89
90 Finds the intersection of this region and another, rectangular region.
91
92 \func{bool}{Intersect}{\param{const wxRegion\&}{ region}}
93
94 Finds the intersection of this region and another region.
95
96 \wxheading{Return value}
97
98 TRUE if successful, FALSE otherwise.
99
100 \wxheading{Remarks}
101
102 Creates the intersection of the two regions, that is, the parts which are in both regions. The result
103 is stored in this region.
104
105 \membersection{wxRegion::IsEmpty}\label{wxregionisempty}
106
107 \constfunc{bool}{IsEmpty}{\void}
108
109 \func{bool}{IsEmpty}{\void}
110
111 Returns TRUE if the region is empty, FALSE otherwise.
112
113 \func{bool}{Subtract}{\param{const wxRect\&}{ rect}}
114
115 Subtracts a rectangular region from this region.
116
117 \func{bool}{Subtract}{\param{const wxRegion\&}{ region}}
118
119 Subtracts a region from this region.
120
121 \wxheading{Return value}
122
123 TRUE if successful, FALSE otherwise.
124
125 \wxheading{Remarks}
126
127 This operation combines the parts of 'this' region that are not part of the second region.
128 The 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
134 Finds the union of this region and another, rectangular region, specified using position and size.
135
136 \func{bool}{Union}{\param{const wxRect\&}{ rect}}
137
138 Finds the union of this region and another, rectangular region.
139
140 \func{bool}{Union}{\param{const wxRegion\&}{ region}}
141
142 Finds the union of this region and another region.
143
144 \wxheading{Return value}
145
146 TRUE if successful, FALSE otherwise.
147
148 \wxheading{Remarks}
149
150 This operation creates a region that combines all of this region and the second region.
151 The 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
157 Finds the Xor of this region and another, rectangular region, specified using position and size.
158
159 \func{bool}{Xor}{\param{const wxRect\&}{ rect}}
160
161 Finds the Xor of this region and another, rectangular region.
162
163 \func{bool}{Xor}{\param{const wxRegion\&}{ region}}
164
165 Finds the Xor of this region and another region.
166
167 \wxheading{Return value}
168
169 TRUE if successful, FALSE otherwise.
170
171 \wxheading{Remarks}
172
173 This operation creates a region that combines all of this region and the second region, except
174 for 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
180 Copies {\it region} by reference counting.
181
182