1 \section{\class{wxRect
}}\label{wxrect
}
3 A class for manipulating rectangles.
5 \wxheading{Derived from
}
9 \wxheading{Include files
}
15 \helpref{wxPoint
}{wxpoint
},
\helpref{wxSize
}{wxsize
}
17 \latexignore{\rtfignore{\wxheading{Members
}}}
19 \membersection{wxRect::wxRect
}
21 \func{}{wxRect
}{\void}
25 \func{}{wxRect
}{\param{int
}{ x
},
\param{int
}{ y
},
\param{int
}{ width
},
\param{int
}{ height
}}
27 Creates a wxRect object from x, y, width and height values.
29 \func{}{wxRect
}{\param{const wxPoint\&
}{ topLeft
},
\param{const wxPoint\&
}{ bottomRight
}}
31 Creates a wxRect object from top-left and bottom-right points.
33 \func{}{wxRect
}{\param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
}}
35 Creates a wxRect object from position and size values.
37 \membersection{wxRect::x
}
41 x coordinate of the top-level corner of the rectangle.
43 \membersection{wxRect::y
}
47 y coordinate of the top-level corner of the rectangle.
49 \membersection{wxRect::width
}
55 \membersection{wxRect::height
}
61 \membersection{wxRect::Deflate
}\label{wxrectdeflate
}
63 \func{void
}{Deflate
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
65 \func{void
}{Deflate
}{\param{wxCoord
}{diff
}}
67 \constfunc{wxRect
}{Deflate
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
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
}.
73 The second form uses the same
{\it diff
} for both
{\it dx
} and
{\it dy
}.
75 The first two versions modify the rectangle in place, the last one returns a
76 new rectangle leaving this one unchanged.
80 \helpref{Inflate
}{wxrectinflate
}
82 \membersection{wxRect::GetBottom
}\label{wxrectgetbottom
}
84 \constfunc{int
}{GetBottom
}{\void}
86 Gets the bottom point of the rectangle.
88 \membersection{wxRect::GetHeight
}\label{wxrectgetheight
}
90 \constfunc{int
}{GetHeight
}{\void}
92 Gets the height member.
94 \membersection{wxRect::GetLeft
}\label{wxrectgetleft
}
96 \constfunc{int
}{GetLeft
}{\void}
98 Gets the left point of the rectangle (the same as
\helpref{wxRect::GetX
}{wxrectgetx
}).
100 \membersection{wxRect::GetPosition
}\label{wxrectgetposition
}
102 \constfunc{wxPoint
}{GetPosition
}{\void}
106 \membersection{wxRect::GetTopLeft
}\label{wxrectgettopleft
}
108 \constfunc{wxPoint
}{GetTopLeft
}{\void}
110 Gets the topleft position of the rectangle. (Same as GetPosition).
112 \membersection{wxRect::GetBottomRight
}\label{wxrectgetbottomright
}
114 \constfunc{wxPoint
}{GetBottomRight
}{\void}
116 Gets the the bottom right position. Returns the bottom right point inside the rectangle.
118 \membersection{wxRect::GetRight
}\label{wxrectgetright
}
120 \constfunc{int
}{GetRight
}{\void}
122 Gets the right point of the rectangle.
124 \membersection{wxRect::GetSize
}\label{wxrectgetsize
}
126 \constfunc{wxSize
}{GetSize
}{\void}
130 \membersection{wxRect::GetTop
}\label{wxrectgettop
}
132 \constfunc{int
}{GetTop
}{\void}
134 Gets the top point of the rectangle (the same as
\helpref{wxRect::GetY
}{wxrectgety
}).
136 \membersection{wxRect::GetWidth
}\label{wxrectgetwidth
}
138 \constfunc{int
}{GetWidth
}{\void}
140 Gets the width member.
142 \membersection{wxRect::GetX
}\label{wxrectgetx
}
144 \constfunc{int
}{GetX
}{\void}
148 \membersection{wxRect::GetY
}\label{wxrectgety
}
150 \constfunc{int
}{GetY
}{\void}
154 \membersection{wxRect::Inflate
}\label{wxrectinflate
}
156 \func{void
}{Inflate
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
158 \func{void
}{Inflate
}{\param{wxCoord
}{diff
}}
160 \constfunc{wxRect
}{Inflate
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
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
166 The second form uses the same
{\it diff
} for both
{\it dx
} and
{\it dy
}.
168 The first two versions modify the rectangle in place, the last one returns a
169 new rectangle leaving this one unchanged.
173 \helpref{Deflate
}{wxrectdeflate
}
175 \membersection{wxRect:Inside
}\label{wxrectinside
}
177 \constfunc{bool
}{Inside
}{\param{int
}{x
},
\param{int
}{y
}}
179 \constfunc{bool
}{Inside
}{\param{const wxPoint\&
}{pt
}}
181 Returns
{\tt true
} if the given point is inside the rectangle (or on its
182 boundary) and
{\tt false
} otherwise.
184 \membersection{wxRect:Intersects
}\label{wxrectintersects
}
186 \constfunc{bool
}{Intersects
}{\param{const wxRect\&
}{rect
}}
188 Returns
{\tt true
} if this rectangle has a non empty intersection with the
189 rectangle
{\it rect
} and
{\tt false
} otherwise.
191 \membersection{wxRect::Offset
}\label{wxrectoffset
}
193 \func{void
}{Offset
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
195 \func{void
}{Offset
}{\param{const wxPoint\&
}{pt
}}
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.
201 \membersection{wxRect::SetHeight
}\label{wxrectsetheight
}
203 \func{void
}{SetHeight
}{\param{int
}{ height
}}
207 \membersection{wxRect::SetWidth
}\label{wxrectsetwidth
}
209 \func{void
}{SetWidth
}{\param{int
}{ width
}}
213 \membersection{wxRect::SetX
}\label{wxrectsetx
}
215 \func{void
}{SetX
}{\param{int
}{ x
}}
219 \membersection{wxRect::SetY
}\label{wxrectsety
}
221 \func{void
}{SetY
}{\param{int
}{ y
}}
225 \membersection{wxRect::operator $=$
}
227 \func{void
}{operator $=$
}{\param{const wxRect\&
}{rect
}}
231 \membersection{wxRect::operator $==$
}
233 \func{bool
}{operator $==$
}{\param{const wxRect\&
}{rect
}}
237 \membersection{wxRect::operator $!=$
}
239 \func{bool
}{operator $!=$
}{\param{const wxRect\&
}{rect
}}