![]() |
PATH![]() |
![]() ![]() |
This section describes the functions you use to perform color-matching when working with QuickDraw. QuickDraw-Specific Color-Matching Functions provides an overview of these functions, while Matching to Displays Using QuickDraw-Specific Operations provides a code sample for working with them. Matching Colors Using General Purpose Functions describes color-matching functions that don't rely on QuickDraw.
NCMBeginMatching
sets up a QuickDraw-specific ColorSync matching session, using the specified source and destination profiles;
changed in ColorSync 2.5
.CMEndMatching
concludes a QuickDraw-specific ColorSync matching session initiated by a previous call to the
NCMBeginMatching
function.CMEnableMatchingComment
inserts a comment into the currently open picture to turn matching on or off.NCMDrawMatchedPicture
matches a picture's colors (using the system profile as the initial source profile but switching to any embedded profiles as they are encountered) to a destination device's color gamut, as the picture is drawn, using the specified destination profile;
changed in ColorSync 2.5
.Sets up a QuickDraw-specific ColorSync matching session, using the specified source and destination profiles.
pascal CMError NCMBeginMatching (
CMProfileRef src,
CMProfileRef dst,
CMMatchRef *myRef);
CMProfileRef
that specifies the source profile for the matching session. Starting with ColorSync version 2.5, you can call
CMGetDefaultProfileBySpace
to get the default profile for a specific color space or
CMGetProfileByAVID
to get a profile for a specific display. With any version of ColorSync, you can specify a
NULL
value to indicate the ColorSync system profile. Note, however, that starting with version 2.5, use of the system profile has changed, as described in
Setting Default Profiles
.CMProfileRef
that specifies the destination profile for the matching session. Starting with ColorSync version 2.5, you can call
CMGetDefaultProfileBySpace
to get the default profile for a specific color space or
CMGetProfileByAVID
to get a profile for a specific display. With any version of ColorSync, you can specify a
NULL
value to indicate the ColorSync system profile. Note, however, that starting with version 2.5, use of the system profile has changed, as described in
Setting Default Profiles
.The NCMBeginMatching function sets up a QuickDraw-specific matching session, telling the ColorSync Manager to match all colors drawn to the current graphics device using the specified source and destination profiles.
The
NCMBeginMatching
function returns a reference to the color-matching session. You must later pass this reference to the function
CMEndMatching
to conclude the session.
The source and destination profiles define how the match is to occur. Passing NULL for either the source or destination profile is equivalent to passing the system profile. If the current device is a screen device, matching to all screen devices occurs.
The NCMBeginMatching and CMEndMatching functions can be nested. In such cases, the ColorSync Manager matches to the most recently added profiles first. Therefore, if you want to use the NCMBeginMatching - CMEndMatching pair to perform a page preview--which typically entails color matching from a source device (scanner) to a destination device (printer) to a preview device (display)-- you first call NCMBeginMatching with the printer-to-display profiles, and then call NCMBeginMatching with the scanner-to-printer profiles. The ColorSync Manager then matches all drawing from the scanner to the printer and then back to the display. The print preview process entails multiprofile transformations. The ColorSync Manager general purpose functions (which include the use of concatenated profiles well suited to print-preview processing) offer an easier and faster way to do this. These functions are described in