- vRect.xLeft = x;
- vRect.yTop = y;
- vRect.xRight = x + vWidth;
- vRect.yBottom = y + vHeight;
-
- if (PRGN_INSIDE == ::GpiRectInRegion( ((wxRegionRefData*)m_refData)->m_hPS
- ,M_REGION
- ,&vRect
- ))
- return wxInRegion;
- else
- return wxOutRegion;
-} // end of wxRegion::Contains
-
-//
-// Does the region contain the rectangle rect
-//
-wxRegionContain wxRegion::Contains(
- const wxRect& rRect
-) const
-{
- if (!m_refData)
- return wxOutRegion;
+ RECTL vRect;
+ vRect.xLeft = rect.x;
+ vRect.xRight = rect.x + rect.width;
+ vRect.yTop = rect.y + rect.height;
+ vRect.yBottom = rect.y;
+
+ LONG lInside = ::GpiRectInRegion( ((wxRegionRefData*)m_refData)->m_hPS,
+ M_REGION,
+ &vRect
+ );
+ switch (lInside)
+ {
+ case RRGN_INSIDE : return wxInRegion;
+ case RRGN_PARTIAL : return wxPartRegion;
+ case RRGN_ERROR :
+ default : return wxOutRegion;
+ }