Important: The information in this document is obsolete and should not be used for new development.
IconSuiteToRgn
You can use theIconSuiteToRgn
function to convert, to a region, the icon mask in an icon suite. You specify a rectangle as one of the parameters to this function.IconSuiteToRgn
determines, from the size of the specified rectangle, which mask from the icon suite to convert. Once it has determined which icon mask to convert,IconSuiteToRgn
uses the specified rectangle as the bounding box of the region.
FUNCTION IconSuiteToRgn (theRgn: RgnHandle; iconRect: Rect; align: IconAlignmentType; theIconSuite: Handle): OSErr;
theRgn
IconSuiteToRgn
returns a handle to the requested region in this parameter. You must allocate memory for the region handle before callingIconSuiteToRgn
.iconRect
- The rectangle in which the icon is to be drawn, specified in local coordinates of the current graphics port.
IconSuiteToRgn
uses this rectangle as the bounding box of the region.IconSuiteToRgn
determines, from the size of the rectangle specified in this parameter, which icon mask to use from the icon suite.align
- A value that specifies how
IconSuiteToRgn
should align the region within the rectangle. See the description ofPlotIconSuite
on page 5-35 for a list of constants you can use in this parameter.theIconSuite
- A handle to an icon suite.
DESCRIPTION
TheIconSuiteToRgn
function modifies the region referred to by the handle in thetheRgn
parameter. The returned region corresponds to the icon's mask (the mask defined by either an'ICN#'
or'ics#'
entry in an icon suite, according to the rectangle and alignment specified in theiconRect
andalign
parameters).RESULT CODES
noErr 0 No error noMaskFoundErr -1000 No mask found