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