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
Matching Colors Using Low-Level Functions Without QuickDraw /


NCWNewColorWorld

Creates a color world for color matching based on the specified source and destination profiles.

pascal CMError NCWNewColorWorld (
CMWorldRef *cw,
CMProfileRef src, 
CMProfileRef dst);
cw
A pointer to a color world. On output, a reference to a matching session color world (page 3-66). You pass this reference to other functions that use the color world.
src
A profile reference (page 3-63) to the source profile to use from the color-matching world. This profile's dataColorSpace element corresponds to the source data type for subsequent calls to functions that use this color world.
dst
A reference to the destination profile to use from the color-matching world. This profile's dataColorSpace element corresponds to the destination data type for subsequent calls to functions using this color world.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
You must set up a color world before your application can perform low-level color-matching or color-checking operations. To set up a color world in which these operations can occur, your application can call the NCWNewColorWorld function after obtaining references to the profiles to use as the source and destination profiles for the color world. The following rules govern the types of profiles allowed:

You should call the CMCloseProfile function (page 3-71) for both the source and destination profiles to dispose of their references after execution of the NCWNewColorWorld function.

When a color-matching or color-checking function is called using this color world, to determine the CMM to use for the session, the ColorSync Manager follows the CMM selection arbitration scheme described in "Introduction to the ColorSync Manager" in Advanced Color Imaging on the Mac OS.

The quality flag setting--indicating normal mode, draft mode, or best mode--specified by the source profile prevails for the entire session. The quality flag setting is stored in the flags field of the profile header. See "Profile Header Structure for ColorSync 2.x" (page 3-43) and "Flag Mask Definitions for Version 2.x Profiles" (page 3-29) for more information on the use of flags. The rendering intent specified by the source profile also prevails for the entire session.

For more information on color worlds, see "Concatenated Profile Set Structure" (page 3-49).

SEE ALSO
The CWConcatColorWorld function (page 3-110) also allocates a color world reference of type CMWorldRef.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996