git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40521
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
Returns {\tt true} if the given point is inside the rectangle (or on its
boundary) and {\tt false} otherwise.
+\constfunc{bool}{Inside}{\param{const wxRect\& }{rect}}
+
+Returns \true if the given rectangle is completely inside this rectangle
+(or touches its boundary) and \false otherwise.
\membersection{wxRect::Intersects}\label{wxrectintersects}
// return true if the point is (not strcitly) inside the rect
bool Inside(int x, int y) const;
bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); }
+ // return true if the rectangle is (not strcitly) inside the rect
+ bool Inside(const wxRect& rect) const;
// return true if the rectangles have a non empty intersection
bool Intersects(const wxRect& rect) const;
);
}
+bool wxRect::Inside(const wxRect& rect) const
+{
+ return Inside(rect.GetTopLeft()) && Inside(rect.GetBottomRight());
+}
+
wxRect& wxRect::Intersect(const wxRect& rect)
{
int x2 = GetRight(),