PlotIcon
PlotIcon Display a 32 x 32-bit (128-byte) icon image
#include <ToolUtils.h> Toolbox Utilities
void PlotIcon( destRect, iconHandle );
Rect *destRect ; rectangle to draw in, in local coordinates
Handle iconHandle ; handle leading to a 128-byte icon image
PlotIcon copies the icon image from its storage on the heap into the current
GrafPort at local coordinates specified by a rectangle. The image is scaled to
match the size of the rectangle.
destRect is the address of an 8-byte Rect structure, expressed in local
coordinates. The icon's original 32 x 32 image is scaled to match the
rectangle's height and width.
iconHandle is a handle leading to the icon image-data. The icon is assumed to be
32-bits wide by 32-bits high (128 bytes total). This is typically a
handle obtained via GetIcon.
Returns: none

Notes: This copies the icon image into the area specified by destRect . The data is
copied in srcCopy transfer mode, overwriting the entire contents of the
rectangle.
To scale the icon, just set destRect to cover an area larger or smaller than
32 x 32. Scaling looks best when you use multiples or sub-multiples such
as 64 x 64 or 16 x 16.
Another way to draw an icon is to create a BitMap whose base address is the
data addressed by iconHandle and then use CopyBits to display the icon,
clipped and transferred using the desired mode. See the example, below.
Example
#include <ToolUtils.h>
#define MY_ICON_ID 129
BitMap iconMap;
Handle iconHandle;
Rect destRect;
RgnHandle specialClipRgn; /* in case you want to clip the output */
iconHandle = GetIcon( MY_ICON_ID );
if ( iconHandle==0 ) {/*... error; couldn't find the resource ... */}
SetRect( & destRect, 100,100,200,200 );
PlotIcon( & destRect, iconHandle ); /* normal way to draw it */
/* == alternate way to draw the icon, using CopyBits === */
HLock( iconHandle); /* lock data in place */
iconMap.baseAddr = *iconHandle; /* dereference the handle */
iconMap.rowBytes = 4; [TOKEN:12074] setup other fields */
SetRect( &iconMap.bounds, 0,0,31,31);
CopyBits( &iconMap, &thePort->portBits,
&iconMap.bounds, & destRect, notSrcCopy, specialClipRgn );
HUnlock(iconHandle); /* all done; let it float */