Important: The information in this document is obsolete and should not be used for new development.
PlotIconMethod
You can use thePlotIconMethod
function 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 ofPlotIconID
on page 5-20 for a list of constants you can use in this parameter.transform
- A value that specifies how
PlotIcon
Method should modify the appearance of the icon. See the description ofPlotIconID
beginning 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
ThePlotIconMethod
function uses your icon getter function to obtain the icon to draw. ThenPlotIconMethod
draws this icon in the specified destination rectangle, with the specified transform and alignment.
PlotIconMethod
passes to your icon getter function the type of the icon to draw and the value specified in theyourDataPtr
parameter. ThePlotIconMethod
function 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.