]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/rect.tex
Missed labels to replace number of 'topicNNN' in anchors. Consistent use of -dtor...
[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 \membersection{wxRect::wxRect}
20
21 \func{}{wxRect}{\void}
22
23 Default constructor.
24
25 \func{}{wxRect}{\param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}}
26
27 Creates a wxRect object from x, y, width and height values.
28
29 \func{}{wxRect}{\param{const wxPoint\&}{ topLeft}, \param{const wxPoint\&}{ bottomRight}}
30
31 Creates a wxRect object from top-left and bottom-right points.
32
33 \func{}{wxRect}{\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size}}
34
35 Creates a wxRect object from position and size values.
36
37 \membersection{wxRect::x}
38
39 \member{int}{x}
40
41 x coordinate of the top-level corner of the rectangle.
42
43 \membersection{wxRect::y}
44
45 \member{int}{y}
46
47 y coordinate of the top-level corner of the rectangle.
48
49 \membersection{wxRect::width}
50
51 \member{int}{width}
52
53 Width member.
54
55 \membersection{wxRect::height}
56
57 \member{int}{height}
58
59 Height member.
60
61 \membersection{wxRect::Deflate}\label{wxrectdeflate}
62
63 \func{void}{Deflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
64
65 \func{void}{Deflate}{\param{wxCoord }{diff}}
66
67 \constfunc{wxRect}{Deflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
68
69 Decrease the rectangle size by {\it dx} in x direction and {\it dy} in y
70 direction. Both (or one of) parameters may be negative to increase the
71 rectngle size. This method is the opposite of \helpref{Inflate}{wxrectinflate}.
72
73 The second form uses the same {\it diff} for both {\it dx} and {\it dy}.
74
75 The first two versions modify the rectangle in place, the last one returns a
76 new rectangle leaving this one unchanged.
77
78 \wxheading{See also}
79
80 \helpref{Inflate}{wxrectinflate}
81
82 \membersection{wxRect::GetBottom}\label{wxrectgetbottom}
83
84 \constfunc{int}{GetBottom}{\void}
85
86 Gets the bottom point of the rectangle.
87
88 \membersection{wxRect::GetHeight}\label{wxrectgetheight}
89
90 \constfunc{int}{GetHeight}{\void}
91
92 Gets the height member.
93
94 \membersection{wxRect::GetLeft}\label{wxrectgetleft}
95
96 \constfunc{int}{GetLeft}{\void}
97
98 Gets the left point of the rectangle (the same as \helpref{wxRect::GetX}{wxrectgetx}).
99
100 \membersection{wxRect::GetPosition}\label{wxrectgetposition}
101
102 \constfunc{wxPoint}{GetPosition}{\void}
103
104 Gets the position.
105
106 \membersection{wxRect::GetTopLeft}\label{wxrectgettopleft}
107
108 \constfunc{wxPoint}{GetTopLeft}{\void}
109
110 Gets the topleft position of the rectangle. (Same as GetPosition).
111
112 \membersection{wxRect::GetBottomRight}\label{wxrectgetbottomright}
113
114 \constfunc{wxPoint}{GetBottomRight}{\void}
115
116 Gets the the bottom right position. Returns the bottom right point inside the rectangle.
117
118 \membersection{wxRect::GetRight}\label{wxrectgetright}
119
120 \constfunc{int}{GetRight}{\void}
121
122 Gets the right point of the rectangle.
123
124 \membersection{wxRect::GetSize}\label{wxrectgetsize}
125
126 \constfunc{wxSize}{GetSize}{\void}
127
128 Gets the size.
129
130 \membersection{wxRect::GetTop}\label{wxrectgettop}
131
132 \constfunc{int}{GetTop}{\void}
133
134 Gets the top point of the rectangle (the same as \helpref{wxRect::GetY}{wxrectgety}).
135
136 \membersection{wxRect::GetWidth}\label{wxrectgetwidth}
137
138 \constfunc{int}{GetWidth}{\void}
139
140 Gets the width member.
141
142 \membersection{wxRect::GetX}\label{wxrectgetx}
143
144 \constfunc{int}{GetX}{\void}
145
146 Gets the x member.
147
148 \membersection{wxRect::GetY}\label{wxrectgety}
149
150 \constfunc{int}{GetY}{\void}
151
152 Gets the y member.
153
154 \membersection{wxRect::Inflate}\label{wxrectinflate}
155
156 \func{void}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
157
158 \func{void}{Inflate}{\param{wxCoord }{diff}}
159
160 \constfunc{wxRect}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
161
162 Increase the rectangle size by {\it dx} in x direction and {\it dy} in y
163 direction. Both (or one of) parameters may be negative to decrease the
164 rectangle size.
165
166 The second form uses the same {\it diff} for both {\it dx} and {\it dy}.
167
168 The first two versions modify the rectangle in place, the last one returns a
169 new rectangle leaving this one unchanged.
170
171 \wxheading{See also}
172
173 \helpref{Deflate}{wxrectdeflate}
174
175 \membersection{wxRect:Inside}\label{wxrectinside}
176
177 \constfunc{bool}{Inside}{\param{int }{x}, \param{int }{y}}
178
179 \constfunc{bool}{Inside}{\param{const wxPoint\& }{pt}}
180
181 Returns {\tt true} if the given point is inside the rectangle (or on its
182 boundary) and {\tt false} otherwise.
183
184 \membersection{wxRect:Intersects}\label{wxrectintersects}
185
186 \constfunc{bool}{Intersects}{\param{const wxRect\& }{rect}}
187
188 Returns {\tt true} if this rectangle has a non empty intersection with the
189 rectangle {\it rect} and {\tt false} otherwise.
190
191 \membersection{wxRect::Offset}\label{wxrectoffset}
192
193 \func{void}{Offset}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
194
195 \func{void}{Offset}{\param{const wxPoint\& }{pt}}
196
197 Moves the rectangle by the specified offset. If {\it dx} is positive, the
198 rectangle is moved to the right, if {\it dy} is positive, it is moved to the
199 bottom, otherwise it is moved to the left or top respectively.
200
201 \membersection{wxRect::SetHeight}\label{wxrectsetheight}
202
203 \func{void}{SetHeight}{\param{int}{ height}}
204
205 Sets the height.
206
207 \membersection{wxRect::SetWidth}\label{wxrectsetwidth}
208
209 \func{void}{SetWidth}{\param{int}{ width}}
210
211 Sets the width.
212
213 \membersection{wxRect::SetX}\label{wxrectsetx}
214
215 \func{void}{SetX}{\param{int}{ x}}
216
217 Sets the x position.
218
219 \membersection{wxRect::SetY}\label{wxrectsety}
220
221 \func{void}{SetY}{\param{int}{ y}}
222
223 Sets the y position.
224
225 \membersection{wxRect::operator $=$}
226
227 \func{void}{operator $=$}{\param{const wxRect\& }{rect}}
228
229 Assignment operator.
230
231 \membersection{wxRect::operator $==$}
232
233 \func{bool}{operator $==$}{\param{const wxRect\& }{rect}}
234
235 Equality operator.
236
237 \membersection{wxRect::operator $!=$}
238
239 \func{bool}{operator $!=$}{\param{const wxRect\& }{rect}}
240
241 Inequality operator.
242