Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 3 - ColorSync Manager Reference for Applications and Device Drivers / ColorSync Manager Functions
Working With Profiles and Profile Identifiers in Pictures /


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
The NCMDrawMatchedPicture 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 of kind cmBeginProfile. However, use of the next profile might not be the intended action. Always pair use of the cmBeginProfile and cmEndProfile picture comments. When the ColorSync Manager encounters an cmEndProfile picture comment, it restores use of the system profile for matching until it encounters another cmBeginProfile 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996