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
}\label{wxrectctor
}
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 \func{}{wxRect
}{\param{const wxSize\&
}{ size
}}
39 Creates a wxRect object from size values at the origin.
41 \membersection{wxRect::x
}\label{wxrectx
}
45 x coordinate of the top-level corner of the rectangle.
47 \membersection{wxRect::y
}\label{wxrecty
}
51 y coordinate of the top-level corner of the rectangle.
53 \membersection{wxRect::width
}\label{wxrectwidth
}
59 \membersection{wxRect::height
}\label{wxrectheight
}
65 \membersection{wxRect::Deflate
}\label{wxrectdeflate
}
67 \func{void
}{Deflate
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
69 \func{void
}{Deflate
}{\param{wxCoord
}{diff
}}
71 \constfunc{wxRect
}{Deflate
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
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
}.
77 The second form uses the same
{\it diff
} for both
{\it dx
} and
{\it dy
}.
79 The first two versions modify the rectangle in place, the last one returns a
80 new rectangle leaving this one unchanged.
84 \helpref{Inflate
}{wxrectinflate
}
86 \membersection{wxRect::GetBottom
}\label{wxrectgetbottom
}
88 \constfunc{int
}{GetBottom
}{\void}
90 Gets the bottom point of the rectangle.
92 \membersection{wxRect::GetHeight
}\label{wxrectgetheight
}
94 \constfunc{int
}{GetHeight
}{\void}
96 Gets the height member.
98 \membersection{wxRect::GetLeft
}\label{wxrectgetleft
}
100 \constfunc{int
}{GetLeft
}{\void}
102 Gets the left point of the rectangle (the same as
\helpref{wxRect::GetX
}{wxrectgetx
}).
104 \membersection{wxRect::GetPosition
}\label{wxrectgetposition
}
106 \constfunc{wxPoint
}{GetPosition
}{\void}
110 \membersection{wxRect::GetTopLeft
}\label{wxrectgettopleft
}
112 \constfunc{wxPoint
}{GetTopLeft
}{\void}
114 Gets the topleft position of the rectangle. (Same as GetPosition).
116 \membersection{wxRect::GetBottomRight
}\label{wxrectgetbottomright
}
118 \constfunc{wxPoint
}{GetBottomRight
}{\void}
120 Gets the the bottom right position. Returns the bottom right point inside the rectangle.
122 \membersection{wxRect::GetRight
}\label{wxrectgetright
}
124 \constfunc{int
}{GetRight
}{\void}
126 Gets the right point of the rectangle.
128 \membersection{wxRect::GetSize
}\label{wxrectgetsize
}
130 \constfunc{wxSize
}{GetSize
}{\void}
134 \membersection{wxRect::GetTop
}\label{wxrectgettop
}
136 \constfunc{int
}{GetTop
}{\void}
138 Gets the top point of the rectangle (the same as
\helpref{wxRect::GetY
}{wxrectgety
}).
140 \membersection{wxRect::GetWidth
}\label{wxrectgetwidth
}
142 \constfunc{int
}{GetWidth
}{\void}
144 Gets the width member.
146 \membersection{wxRect::GetX
}\label{wxrectgetx
}
148 \constfunc{int
}{GetX
}{\void}
152 \membersection{wxRect::GetY
}\label{wxrectgety
}
154 \constfunc{int
}{GetY
}{\void}
158 \membersection{wxRect::Inflate
}\label{wxrectinflate
}
160 \func{void
}{Inflate
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
162 \func{void
}{Inflate
}{\param{wxCoord
}{diff
}}
164 \constfunc{wxRect
}{Inflate
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
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
170 The second form uses the same
{\it diff
} for both
{\it dx
} and
{\it dy
}.
172 The first two versions modify the rectangle in place, the last one returns a
173 new rectangle leaving this one unchanged.
177 \helpref{Deflate
}{wxrectdeflate
}
179 \membersection{wxRect::Inside
}\label{wxrectinside
}
181 \constfunc{bool
}{Inside
}{\param{int
}{x
},
\param{int
}{y
}}
183 \constfunc{bool
}{Inside
}{\param{const wxPoint\&
}{pt
}}
185 Returns
{\tt true
} if the given point is inside the rectangle (or on its
186 boundary) and
{\tt false
} otherwise.
188 \membersection{wxRect::Intersects
}\label{wxrectintersects
}
190 \constfunc{bool
}{Intersects
}{\param{const wxRect\&
}{rect
}}
192 Returns
{\tt true
} if this rectangle has a non empty intersection with the
193 rectangle
{\it rect
} and
{\tt false
} otherwise.
195 \membersection{wxRect::Offset
}\label{wxrectoffset
}
197 \func{void
}{Offset
}{\param{wxCoord
}{dx
},
\param{wxCoord
}{dy
}}
199 \func{void
}{Offset
}{\param{const wxPoint\&
}{pt
}}
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.
205 \membersection{wxRect::SetHeight
}\label{wxrectsetheight
}
207 \func{void
}{SetHeight
}{\param{int
}{ height
}}
211 \membersection{wxRect::SetWidth
}\label{wxrectsetwidth
}
213 \func{void
}{SetWidth
}{\param{int
}{ width
}}
217 \membersection{wxRect::SetX
}\label{wxrectsetx
}
219 \func{void
}{SetX
}{\param{int
}{ x
}}
223 \membersection{wxRect::SetY
}\label{wxrectsety
}
225 \func{void
}{SetY
}{\param{int
}{ y
}}
229 \membersection{wxRect::operator $=$
}\label{wxrectassign
}
231 \func{void
}{operator $=$
}{\param{const wxRect\&
}{rect
}}
235 \membersection{wxRect::operator $==$
}\label{wxrectequal
}
237 \func{bool
}{operator $==$
}{\param{const wxRect\&
}{rect
}}
241 \membersection{wxRect::operator $!=$
}\label{wxrectnotequal
}
243 \func{bool
}{operator $!=$
}{\param{const wxRect\&
}{rect
}}