Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 5 - Icon Utilities / Icon Utilities Reference
Icon Utilities Routines


Drawing Icons From Resources

The routines described in this section allow you to plot an icon directly from a resource without first creating an icon suite.

To draw an icon from an icon family (that is, those resources of type 'ICN#', 'ics#', 'icl4', 'icl8', 'ics4', or 'ics8' that share the same resource ID), use the PlotIconID function. This function gets the icon's data from its resource and also allows you to specify transforms and alignment. The PlotIconID function also determines, from the destination rectangle in which the icon is to be drawn and the current bit depth of the display device, which resource type to get from the icon family.

To draw an icon obtained with the aid of an icon getter function, use the PlotIconMethod function. For information about icon getter functions, see "Icon Getter Functions" beginning on page 5-58.

To plot an icon of resource types 'ICON' and 'cicn' from an icon handle previously obtained from the GetIcon or GetCIcon function, use the PlotIconHandle and PlotCIconHandle functions, respectively. These functions allow you to specify transforms and alignment.

You can also plot an icon of resource types 'ICON' and 'cicn' using the PlotIcon and PlotCIcon procedures, respectively. However, neither of these procedures allow you to specify transforms and alignment.

To plot an icon of resource type 'SICN', use the PlotSICNHandle function. This function allows you to specify transforms and alignment.


Subtopics
PlotIconID
PlotIconMethod
PlotIcon
PlotIconHandle
PlotCIcon
PlotCIconHandle
PlotSICNHandle

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996