MakePixFamily
MakePixFamily(bwRsrcSpec, maskRsrcSpec, colorSpecs)
Creates pix family from a set of PICTs.
DISCUSSION
- bwRsrcSpec
- String for the name of a black and white PICT resource to use in 2.0 and 1.x systems, or
nil
if backward compatibility is not desired.
- maskRsrcSpec
- String for the name of a black and white PICT resource to use as a mask or
nil
if there is no mask.
- colorSpecs
- A color spec or an array of color specs. A color spec is either a string for the PICT resource name or a frame with the following slots:
rsrcSpec
Required. A string for the PICT resource name.
bitDepth
Optional. An integer for the bit depth of the PICT. The following values are allowed: 1, 2, 4, and 8.If you do not specify a bit depth for a particular PICT, the bit depth is determined automatically from the PICT resource. If you want the image to be included in your project at a particular bit depth, you should specify it explicitly.
- return value
- A pix family frame, it can be passed to
CopyBits
, used in the icon slot of aclPictureView
, or passed to *MakeShape
to create a bitmap shape.
If colorSpecs contains an array, the system displays the most appropriate image for the current hardware.
The resource names are for named PICT resources within any resource file included in the current project. If more than one PICT is used, then all the PICTs must have the same size bounds, or this function will throw. This includes all the PICTs referred to in the bwRsrcSpec, maskRsrcSpec, and colorSpecs parameters.
SEE ALSO
NTK's picture slot editor provides a simple way to create a pix family. See "Picture Slot Editor".
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help