Important: The information in this document is obsolete and should not be used for new development.
LoadIconCache
You can use theLoadIconCachefunction to load into an icon cache a handle to the appropriate icon data for a specified destination rectangle and the current bit depth, for drawing later with a specified alignment and transform.
FUNCTION LoadIconCache (theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theIconCache: Handle): OSErr;
theRect- The rectangle in which to draw the icon, specified in local coordinates of the current graphics port.
LoadIconCacheuses the rectangle specified in this parameter and the bit depth of the display device to determine which icon type to load into the cache.align- A value that specifies how to align the icon within the rectangle. See the description of
PlotIconSuiteon page 5-35 for a list of constants you can use in this parameter.transform- A value that specifies how to modify the appearance of the icon. See the description of
PlotIconSuitebeginning on page 5-35 for a list of constants you can use in this parameter.theIconCache- A handle to the icon cache into which to load the icon data.
DESCRIPTION
You can load icon data into an icon cache with theLoadIconCachefunction for drawing at a later time. For example, this can be useful if you suspect that the icon may be drawn at a time not convenient for loading resource data (for instance, when the resource fork isn't in the current resource chain). TheLoadIconCachefunction uses the same criteria asPlotIconSuiteto select the icon to load.
LoadIconCacheuses the icon getter function associated with the icon cache to get the appropriate icon. The icon getter function returns a handle to the requested icon data, andLoadIconCacheadds the returned handle to the entry for that icon in the icon cache.After calling
LoadIconCache, you can pass the same parameters toPlotIconSuiteto plot the icon data. Note that if you specify an alignment when you callLoadIconCache, then callPlotIconSuiteand specify no alignment,PlotIconSuitedraws the icon using the alignment that you originally specified toLoadIconCache.RESULT CODES
noErr 0 No error noMaskFoundErr -1000 No mask found SEE ALSO
For a description of thePlotIconSuitefunction, see page 5-35.