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 on the Mac OS /
Chapter 7 - Color Manager / About the Color Manager


Graphics Devices

The Color Manager, like Color QuickDraw, accesses a particular graphics device through a data structure known as a GDevice data structure. Each GDevice data structure stores information about a particular graphics device; after this data structure is initialized, the device itself is known to the Color Manager and QuickDraw through that GDevice data structure.

A graphics device, represented by a GDevice data structure, is a logical device that the software treats identically whether it is a video card, a display device, or an offscreen graphics world. The Color Manager uses fields of the GDevice data structure to track application-defined functions and to manage the device CLUT. (See the chapter "Graphics Devices" in Inside Macintosh: Imaging With QuickDraw for additional information about the GDevice data structure.)

The Color Manager uses three fields of a GDevice data structure to track application-defined custom search and complement functions. The gdSearchProc field contains a handle to a list of search functions, and the gdCompProc field contains a handle to a list of color complement functions. In each list the Color Manager's default function is at the end of the list, to be used if there are no others, or if they fail. The gdId field contains an identifier to connect a particular custom function with the application that created it.

Two fields of the GDevice data structure contain handles to tables that the Color Manager uses to specify and look up the colors in a device's CLUT. The gdPMap field contains a handle to the pixel map for the device. The pixel map in turn contains a handle to the ColorTable data structure that contains the colors currently loaded in the CLUT. The gdITable field contains a handle to an inverse table that the Color Manager creates and maintains as a means of quickly finding colors in the color table.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1996