Important: The information in this document is obsolete and should not be used for new development.
RectInRgn
To determine whether a rectangle intersects a region, use theRectInRgn
function.
FUNCTION RectInRgn (r:\xDDRect; rgn:\xDDRgnHandle):\xDDBoolean;
r
- The rectangle to check for intersection.
rgn
- A handle to the region to check.
DESCRIPTION
TheRectInRgn
function checks whether the rectangle specified in ther
parameter intersects the region whose handle you pass in thergn
parameter. TheRectInRgn
function returnsTRUE
if the intersection encloses at least 1 bit orFALSE
if it does not.SPECIAL CONSIDERATIONS
TheRectInRgn
function sometimes returnsTRUE
when the rectangle merely intersects the region's bounding rectangle. If you need to know exactly whether a given rectangle intersects the actual region, you can use theRectRgn
procedure (described on page 3-88) to set the rectangle to a region, and callSectRgn
(described on page 3-90) to see whether the two regions intersect. If the result ofSectRgn
is an empty region, then the rectangle doesn't intersect the region.