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 5 - Color Manager Reference /
Color Manager Functions / Managing Colors


MakeITable

Used by system software to generate an inverse table for a color table.

pascal void MakeITable (
CTabHandle cTabH, 
ITabHandle iTabH,
short res);
cTabH
The color table for which an inverse table is to be generated.
iTabH
The generated inverse table.
res
The resolution needed for the inverse table.
DISCUSSION
The MakeITable function generates an inverse table based on the current contents of the color table pointed to by the colorTab parameter, with a resolution specified by the value in the res parameter. Reserved color table pixel values are not included in the resulting color table. MakeITable tests its input parameters and returns an error in QDError if the resolution is less than three or greater than five. Passing NULL in the colorTab or inverseTab parameter substitutes an appropriate handle from the current GDevice data structure, while passing 0 in the res parameter substitutes the current GDevice data structure's inverse table resolution. These defaults can be used in any combination with explicit values, or with NULL parameter values.

This function allows maximum precision in mapping colors, even if colors in the color table differ by less than the resolution of the inverse table. Five-bit inverse tables are not needed when drawing in normal Color QuickDraw modes. However, Color QuickDraw transfer modes such as add, subtract, and blend may require a 5-bit inverse table for best results with certain color tables. MakeITable returns an error in QDError if the destination inverse table memory cannot be allocated. The 'mitq' resource governs how much memory is allocated for temporary internal structures; this resource type is for internal use only.

SPECIAL CONSIDERATIONS
Depending on the requested resolution, building the inverse table can require large amounts of temporary space in the application heap: twice the size of the table itself, plus a fixed overhead of 3-15 KB for each inverse table resolution.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996