Important: The information in this document is obsolete and should not be used for new development.
PlotIconMethod
You can use thePlotIconMethodfunction to plot an icon obtained with the aid of an icon getter function for a specified destination rectangle and alignment.
FUNCTION PlotIconMethod (theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theMethod: IconGetter; yourDataPtr: UNIV Ptr): 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 to align the icon within the rectangle specified by
theRect. See the description ofPlotIconIDon page 5-20 for a list of constants you can use in this parameter.transform- A value that specifies how
PlotIconMethod should modify the appearance of the icon. See the description ofPlotIconIDbeginning on page 5-20 for a list of constants you can use in this parameter.theMethod- A pointer to an icon getter function.
yourDataPtr- A pointer to data that is passed to your icon getter function.
DESCRIPTION
ThePlotIconMethodfunction uses your icon getter function to obtain the icon to draw. ThenPlotIconMethoddraws this icon in the specified destination rectangle, with the specified transform and alignment.
PlotIconMethodpasses to your icon getter function the type of the icon to draw and the value specified in theyourDataPtrparameter. ThePlotIconMethodfunction examines the current bit depth of the display devices and calls your icon getter function once for each display device that intersects the rectangle specified in the parametertheRect. Your icon getter function should return a handle to the requested icon's data. Your icon getter function can get the icon data using whatever method is appropriate to your application. For example, your application might maintain its own cache of icons or use its icon getter function to get an icon from the desktop database.RESULT CODES
noErr 0 No error noMaskFoundErr -1000 No mask found SEE ALSO
For more information about icon getter functions, see page 5-58.