]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/rect.tex
regenerated autoconf files using bakefile-0.1.5
[wxWidgets.git] / docs / latex / wx / rect.tex
1 \section{\class{wxRect}}\label{wxrect}
2
3 A class for manipulating rectangles.
4
5 \wxheading{Derived from}
6
7 None
8
9 \wxheading{Include files}
10
11 <wx/gdicmn.h>
12
13 \wxheading{See also}
14
15 \helpref{wxPoint}{wxpoint}, \helpref{wxSize}{wxsize}
16
17 \latexignore{\rtfignore{\wxheading{Members}}}
18
19
20 \membersection{wxRect::wxRect}\label{wxrectctor}
21
22 \func{}{wxRect}{\void}
23
24 Default constructor.
25
26 \func{}{wxRect}{\param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}}
27
28 Creates a wxRect object from x, y, width and height values.
29
30 \func{}{wxRect}{\param{const wxPoint\&}{ topLeft}, \param{const wxPoint\&}{ bottomRight}}
31
32 Creates a wxRect object from top-left and bottom-right points.
33
34 \func{}{wxRect}{\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size}}
35
36 Creates a wxRect object from position and size values.
37
38 \func{}{wxRect}{\param{const wxSize\&}{ size}}
39
40 Creates a wxRect object from size values at the origin.
41
42
43 \membersection{wxRect::x}\label{wxrectx}
44
45 \member{int}{x}
46
47 x coordinate of the top-level corner of the rectangle.
48
49
50 \membersection{wxRect::y}\label{wxrecty}
51
52 \member{int}{y}
53
54 y coordinate of the top-level corner of the rectangle.
55
56
57 \membersection{wxRect::width}\label{wxrectwidth}
58
59 \member{int}{width}
60
61 Width member.
62
63
64 \membersection{wxRect::height}\label{wxrectheight}
65
66 \member{int}{height}
67
68 Height member.
69
70
71 \membersection{wxRect::Deflate}\label{wxrectdeflate}
72
73 \func{void}{Deflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
74
75 \func{void}{Deflate}{\param{wxCoord }{diff}}
76
77 \constfunc{wxRect}{Deflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
78
79 Decrease the rectangle size by {\it dx} in x direction and {\it dy} in y
80 direction. Both (or one of) parameters may be negative to increase the
81 rectngle size. This method is the opposite of \helpref{Inflate}{wxrectinflate}.
82
83 The second form uses the same {\it diff} for both {\it dx} and {\it dy}.
84
85 The first two versions modify the rectangle in place, the last one returns a
86 new rectangle leaving this one unchanged.
87
88 \wxheading{See also}
89
90 \helpref{Inflate}{wxrectinflate}
91
92
93 \membersection{wxRect::GetBottom}\label{wxrectgetbottom}
94
95 \constfunc{int}{GetBottom}{\void}
96
97 Gets the bottom point of the rectangle.
98
99
100 \membersection{wxRect::GetHeight}\label{wxrectgetheight}
101
102 \constfunc{int}{GetHeight}{\void}
103
104 Gets the height member.
105
106
107 \membersection{wxRect::GetLeft}\label{wxrectgetleft}
108
109 \constfunc{int}{GetLeft}{\void}
110
111 Gets the left point of the rectangle (the same as \helpref{wxRect::GetX}{wxrectgetx}).
112
113
114 \membersection{wxRect::GetPosition}\label{wxrectgetposition}
115
116 \constfunc{wxPoint}{GetPosition}{\void}
117
118 Gets the position.
119
120
121 \membersection{wxRect::GetTopLeft}\label{wxrectgettopleft}
122
123 \constfunc{wxPoint}{GetTopLeft}{\void}
124
125 Gets the topleft position of the rectangle. (Same as GetPosition).
126
127
128 \membersection{wxRect::GetBottomRight}\label{wxrectgetbottomright}
129
130 \constfunc{wxPoint}{GetBottomRight}{\void}
131
132 Gets the the bottom right position. Returns the bottom right point inside the rectangle.
133
134
135 \membersection{wxRect::GetRight}\label{wxrectgetright}
136
137 \constfunc{int}{GetRight}{\void}
138
139 Gets the right point of the rectangle.
140
141
142 \membersection{wxRect::GetSize}\label{wxrectgetsize}
143
144 \constfunc{wxSize}{GetSize}{\void}
145
146 Gets the size.
147
148
149 \membersection{wxRect::GetTop}\label{wxrectgettop}
150
151 \constfunc{int}{GetTop}{\void}
152
153 Gets the top point of the rectangle (the same as \helpref{wxRect::GetY}{wxrectgety}).
154
155
156 \membersection{wxRect::GetWidth}\label{wxrectgetwidth}
157
158 \constfunc{int}{GetWidth}{\void}
159
160 Gets the width member.
161
162
163 \membersection{wxRect::GetX}\label{wxrectgetx}
164
165 \constfunc{int}{GetX}{\void}
166
167 Gets the x member.
168
169
170 \membersection{wxRect::GetY}\label{wxrectgety}
171
172 \constfunc{int}{GetY}{\void}
173
174 Gets the y member.
175
176
177 \membersection{wxRect::Inflate}\label{wxrectinflate}
178
179 \func{void}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
180
181 \func{void}{Inflate}{\param{wxCoord }{diff}}
182
183 \constfunc{wxRect}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
184
185 Increase the rectangle size by {\it dx} in x direction and {\it dy} in y
186 direction. Both (or one of) parameters may be negative to decrease the
187 rectangle size.
188
189 The second form uses the same {\it diff} for both {\it dx} and {\it dy}.
190
191 The first two versions modify the rectangle in place, the last one returns a
192 new rectangle leaving this one unchanged.
193
194 \wxheading{See also}
195
196 \helpref{Deflate}{wxrectdeflate}
197
198
199 \membersection{wxRect::Inside}\label{wxrectinside}
200
201 \constfunc{bool}{Inside}{\param{int }{x}, \param{int }{y}}
202
203 \constfunc{bool}{Inside}{\param{const wxPoint\& }{pt}}
204
205 Returns {\tt true} if the given point is inside the rectangle (or on its
206 boundary) and {\tt false} otherwise.
207
208
209 \membersection{wxRect::Intersects}\label{wxrectintersects}
210
211 \constfunc{bool}{Intersects}{\param{const wxRect\& }{rect}}
212
213 Returns {\tt true} if this rectangle has a non empty intersection with the
214 rectangle {\it rect} and {\tt false} otherwise.
215
216
217 \membersection{wxRect::Offset}\label{wxrectoffset}
218
219 \func{void}{Offset}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
220
221 \func{void}{Offset}{\param{const wxPoint\& }{pt}}
222
223 Moves the rectangle by the specified offset. If {\it dx} is positive, the
224 rectangle is moved to the right, if {\it dy} is positive, it is moved to the
225 bottom, otherwise it is moved to the left or top respectively.
226
227
228 \membersection{wxRect::SetHeight}\label{wxrectsetheight}
229
230 \func{void}{SetHeight}{\param{int}{ height}}
231
232 Sets the height.
233
234
235 \membersection{wxRect::SetWidth}\label{wxrectsetwidth}
236
237 \func{void}{SetWidth}{\param{int}{ width}}
238
239 Sets the width.
240
241
242 \membersection{wxRect::SetX}\label{wxrectsetx}
243
244 \func{void}{SetX}{\param{int}{ x}}
245
246 Sets the x position.
247
248
249 \membersection{wxRect::SetY}\label{wxrectsety}
250
251 \func{void}{SetY}{\param{int}{ y}}
252
253 Sets the y position.
254
255
256 \membersection{wxRect::Union}\label{wxrectunion}
257
258 \constfunc{wxRect}{Union}{\param{const wxRect\&}{ rect}}
259
260 \func{wxRect\&}{Union}{\param{const wxRect\&}{ rect}}
261
262 Modifies the rectangle to contain the bounding box of this rectangle and the
263 one passed in as parameter. The const version returns the new rectangle, the
264 other one modifies this rectangle in place.
265
266
267 \membersection{wxRect::operator $=$}\label{wxrectassign}
268
269 \func{void}{operator $=$}{\param{const wxRect\& }{rect}}
270
271 Assignment operator.
272
273
274 \membersection{wxRect::operator $==$}\label{wxrectequal}
275
276 \func{bool}{operator $==$}{\param{const wxRect\& }{rect}}
277
278 Equality operator.
279
280
281 \membersection{wxRect::operator $!=$}\label{wxrectnotequal}
282
283 \func{bool}{operator $!=$}{\param{const wxRect\& }{rect}}
284
285 Inequality operator.
286