Important: The information in this document is obsolete and should not be used for new development.
PlotIcon
You can use thePlotIcon
procedure to plot an icon of resource type'ICON'
. You must have previously obtained a handle to the icon usingGetIcon
(orGetResource
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
ThePlotIcon
procedure draws the icon specified by the given handle. UnlikePlotIconHandle
,PlotIcon
does not allow you to specify any transforms or alignment. ThePlotIcon
procedure uses the QuickDraw procedureCopyBits
with thesrcCopy
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, usePlotIconHandle
(described next).SEE ALSO
For an example of the use of thePlotIcon
procedure, see Listing 5-5 on page 5-14. For information onGetIcon
, see page 5-28. For information on the QuickDraw procedureCopyBits
, see Inside Macintosh: Imaging with QuickDraw.