Important: The information in this document is obsolete and should not be used for new development.
NCMDrawMatchedPicture
Matches a picture's colors to a destination device's color gamut as the picture is drawn, based on the specified profile.
pascal void NCMDrawMatchedPicture ( PicHandle myPicture, CMProfileRef dst, Rect *myRect);
myPicture
- The QuickDraw picture whose colors are to be matched.
dst
- A profile reference (page 3-63) to the profile of the destination device. To indicate the system profile, specify a
NULL
value.myRect
- A pointer to a destination rectangle for rendering the picture specified by
myPicture
.- function result
- This routine does not return an error value. Instead, after calling NCMDrawMatchedPicture you call the
QDError
routine to determine if an error has occurred.DISCUSSION
TheNCMDrawMatchedPicture
function operates in the context of the current color graphics port. This function sets up and takes down a color-matching session. It automatically matches all colors in a picture to the destination profile for a destination device as the picture is drawn. It uses the ColorSync system profile as the initial source profile and any embedded profiles thereafter. (Because color-matching picture comments embedded in the picture to be matched are recognized, embedded profiles are used.)For embedding to work correctly, the currently effective profile must be terminated by a picture comment of kind
cmEndProfile
after drawing operations using that profile are performed. If a picture comment is specified to end the profile, the profile will remain in effect until the next embedded profile is introduced with a picture comment ofkind cmBeginProfile
. However, use of the next profile might not be the intended action. Always pair use of thecmBeginProfile
andcmEndProfile
picture comments. When the ColorSync Manager encounters ancmEndProfile
picture comment, it restores use of the system profile for matching until it encounters anothercmBeginProfile
picture comment.The picture is drawn with matched colors to all screen graphics devices. If the current graphics device is not a screen device, matching occurs for that graphics device only.
If the current port is an original QuickDraw graphics port, then calling this function is equivalent to calling
DrawPicture
, in which case no color matching occurs.