Important: The information in this document is obsolete and should not be used for new development.
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
TheMakeITablefunction generates an inverse table based on the current contents of the color table pointed to by thecolorTabparameter, with a resolution specified by the value in theresparameter. Reserved color table pixel values are not included in the resulting color table.MakeITabletests its input parameters and returns an error inQDErrorif the resolution is less than three or greater than five. PassingNULLin thecolorTaborinverseTabparameter substitutes an appropriate handle from the currentGDevicedata structure, while passing 0 in theresparameter substitutes the currentGDevicedata structure's inverse table resolution. These defaults can be used in any combination with explicit values, or withNULLparameter 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.
MakeITablereturns an error inQDErrorif 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.