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


PlotIcon

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

PROCEDURE PlotIcon (theRect: Rect; theIcon: Handle);
theRect
The rectangle in which to draw the icon, specified in local coordinates of the current graphics port.
theIcon
A handle to the icon to draw.
DESCRIPTION
The PlotIcon procedure draws the icon specified by the given handle. Unlike PlotIconHandle, PlotIcon does not allow you to specify any transforms or alignment. The PlotIcon procedure uses the QuickDraw procedure CopyBits with the srcCopy transfer mode.

If the destination rectangle is not 32 by 32 pixels, PlotIcon stretches or shrinks the icon to fit.

To plot an icon of resource type 'ICON' with a specified transform and alignment, use PlotIconHandle (described next).

SEE ALSO
For an example of the use of the PlotIcon procedure, see Listing 5-5 on page 5-14. For information on GetIcon, see page 5-28. For information on the QuickDraw procedure CopyBits, see Inside Macintosh: Imaging with QuickDraw.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996