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


PlotIconHandle

You can use the PlotIconHandle function to plot an icon of resource type 'ICON' or 'ICN#'. You must have previously obtained a handle to the icon using GetIcon (or GetResource or other Resource Manager routines).

FUNCTION PlotIconHandle (theRect: Rect; align: IconAlignmentType;
                         transform: IconTransformType; 
                         theIcon: Handle): OSErr;
theRect
The rectangle in which to draw the icon, specified in local coordinates of the current graphics port.
align
A value that specifies how PlotIconHandle should align the icon within the rectangle. See the description of PlotIconID on page 5-20 for a list of constants you can use in this parameter.
transform
A value that specifies how PlotIconHandle should modify the appearance of the icon. See the description of PlotIconID beginning on page 5-20 for a list of constants you can use in this parameter.
theIcon
A handle to the icon to draw.
DESCRIPTION
The PlotIconHandle function draws the icon specified by the theIcon parameter with the transform and alignment specified by the transform and align parameters.

IMPORTANT
To plot an icon from an icon suite, you should normally use PlotIconSuite. The PlotIconHandle function may not draw the icon correctly if you pass it the handle returned in the theIconData parameter of GetIconFromSuite.
RESULT CODES
noErr0No error
noMaskFoundErr-1000No mask found
SEE ALSO
For an example of the use of the PlotIconHandle function, see Listing 5-6 on page 5-15. For information on GetIcon, see page 5-28.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996