Important: The information in this document is obsolete and should not be used for new development.
RectInIconID
You can use theRectInIconID
function to hit-test a rectangle against the appropriate icon mask from an icon family for a specified destination rectangle and alignment.
FUNCTION RectInIconID (testRect: Rect; iconRect: Rect; align: IconAlignmentType; iconID: Integer): Boolean;
testRect
- The rectangle to be tested, specified in local coordinates of the current graphics port.
iconRect
- The rectangle in which the icon appears, specified in local coordinates of the current graphics port. Like
PtInIconID
,RectInIconID
determines, from the size of the rectangle specified in this parameter, which icon mask from the icon family to test thetestRect
parameter against.align
- A value that specifies how the icon against which to hit-test is aligned within the rectangle specified by
iconRect
. See the description ofPlotIconID
on page 5-20 for a list of constants you can use in this parameter.iconID
- A resource ID for an icon family.
DESCRIPTION
TheRectInIconID
function hit-tests the rectangle specified bytestRect
against the appropriate icon mask from the icon family as it appears in theiconRect
rectangle. The parametersiconRect
andalign
should be the same as when the icon was last drawn. TheRectInIconID
function returnsTRUE
if the rectangle intersects the icon mask andFALSE
if it doesn't.