]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/rect.tex
wxMediaCtrl API changes for 2.5.x/2.6
[wxWidgets.git] / docs / latex / wx / rect.tex
... / ...
CommitLineData
1\section{\class{wxRect}}\label{wxrect}
2
3A class for manipulating rectangles.
4
5\wxheading{Derived from}
6
7None
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
24Default constructor.
25
26\func{}{wxRect}{\param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}}
27
28Creates a wxRect object from x, y, width and height values.
29
30\func{}{wxRect}{\param{const wxPoint\&}{ topLeft}, \param{const wxPoint\&}{ bottomRight}}
31
32Creates a wxRect object from top-left and bottom-right points.
33
34\func{}{wxRect}{\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size}}
35
36Creates a wxRect object from position and size values.
37
38\func{}{wxRect}{\param{const wxSize\&}{ size}}
39
40Creates a wxRect object from size values at the origin.
41
42
43\membersection{wxRect::x}\label{wxrectx}
44
45\member{int}{x}
46
47x coordinate of the top-level corner of the rectangle.
48
49
50\membersection{wxRect::y}\label{wxrecty}
51
52\member{int}{y}
53
54y coordinate of the top-level corner of the rectangle.
55
56
57\membersection{wxRect::width}\label{wxrectwidth}
58
59\member{int}{width}
60
61Width member.
62
63
64\membersection{wxRect::height}\label{wxrectheight}
65
66\member{int}{height}
67
68Height 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
79Decrease the rectangle size by {\it dx} in x direction and {\it dy} in y
80direction. Both (or one of) parameters may be negative to increase the
81rectngle size. This method is the opposite of \helpref{Inflate}{wxrectinflate}.
82
83The second form uses the same {\it diff} for both {\it dx} and {\it dy}.
84
85The first two versions modify the rectangle in place, the last one returns a
86new 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
97Gets the bottom point of the rectangle.
98
99
100\membersection{wxRect::GetHeight}\label{wxrectgetheight}
101
102\constfunc{int}{GetHeight}{\void}
103
104Gets the height member.
105
106
107\membersection{wxRect::GetLeft}\label{wxrectgetleft}
108
109\constfunc{int}{GetLeft}{\void}
110
111Gets 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
118Gets the position.
119
120
121\membersection{wxRect::GetTopLeft}\label{wxrectgettopleft}
122
123\constfunc{wxPoint}{GetTopLeft}{\void}
124
125Gets the topleft position of the rectangle. (Same as GetPosition).
126
127
128\membersection{wxRect::GetBottomRight}\label{wxrectgetbottomright}
129
130\constfunc{wxPoint}{GetBottomRight}{\void}
131
132Gets 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
139Gets the right point of the rectangle.
140
141
142\membersection{wxRect::GetSize}\label{wxrectgetsize}
143
144\constfunc{wxSize}{GetSize}{\void}
145
146Gets the size.
147
148
149\membersection{wxRect::GetTop}\label{wxrectgettop}
150
151\constfunc{int}{GetTop}{\void}
152
153Gets 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
160Gets the width member.
161
162
163\membersection{wxRect::GetX}\label{wxrectgetx}
164
165\constfunc{int}{GetX}{\void}
166
167Gets the x member.
168
169
170\membersection{wxRect::GetY}\label{wxrectgety}
171
172\constfunc{int}{GetY}{\void}
173
174Gets 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
185Increase the rectangle size by {\it dx} in x direction and {\it dy} in y
186direction. Both (or one of) parameters may be negative to decrease the
187rectangle size.
188
189The second form uses the same {\it diff} for both {\it dx} and {\it dy}.
190
191The first two versions modify the rectangle in place, the last one returns a
192new 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
205Returns {\tt true} if the given point is inside the rectangle (or on its
206boundary) and {\tt false} otherwise.
207
208
209\membersection{wxRect::Intersects}\label{wxrectintersects}
210
211\constfunc{bool}{Intersects}{\param{const wxRect\& }{rect}}
212
213Returns {\tt true} if this rectangle has a non empty intersection with the
214rectangle {\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
223Moves the rectangle by the specified offset. If {\it dx} is positive, the
224rectangle is moved to the right, if {\it dy} is positive, it is moved to the
225bottom, 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
232Sets the height.
233
234
235\membersection{wxRect::SetWidth}\label{wxrectsetwidth}
236
237\func{void}{SetWidth}{\param{int}{ width}}
238
239Sets the width.
240
241
242\membersection{wxRect::SetX}\label{wxrectsetx}
243
244\func{void}{SetX}{\param{int}{ x}}
245
246Sets the x position.
247
248
249\membersection{wxRect::SetY}\label{wxrectsety}
250
251\func{void}{SetY}{\param{int}{ y}}
252
253Sets 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
262Modifies the rectangle to contain the bounding box of this rectangle and the
263one passed in as parameter. The const version returns the new rectangle, the
264other one modifies this rectangle in place.
265
266
267\membersection{wxRect::operator $=$}\label{wxrectassign}
268
269\func{void}{operator $=$}{\param{const wxRect\& }{rect}}
270
271Assignment operator.
272
273
274\membersection{wxRect::operator $==$}\label{wxrectequal}
275
276\func{bool}{operator $==$}{\param{const wxRect\& }{rect}}
277
278Equality operator.
279
280
281\membersection{wxRect::operator $!=$}\label{wxrectnotequal}
282
283\func{bool}{operator $!=$}{\param{const wxRect\& }{rect}}
284
285Inequality operator.
286