Important: The information in this document is obsolete and should not be used for new development.
RectInIconID
You can use theRectInIconIDfunction 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,RectInIconIDdetermines, from the size of the rectangle specified in this parameter, which icon mask from the icon family to test thetestRectparameter 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 ofPlotIconIDon page 5-20 for a list of constants you can use in this parameter.iconID- A resource ID for an icon family.
DESCRIPTION
TheRectInIconIDfunction hit-tests the rectangle specified bytestRectagainst the appropriate icon mask from the icon family as it appears in theiconRectrectangle. The parametersiconRectandalignshould be the same as when the icon was last drawn. TheRectInIconIDfunction returnsTRUEif the rectangle intersects the icon mask andFALSEif it doesn't.