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
TheMakeITable
function generates an inverse table based on the current contents of the color table pointed to by thecolorTab
parameter, with a resolution specified by the value in theres
parameter. Reserved color table pixel values are not included in the resulting color table.MakeITable
tests its input parameters and returns an error inQDError
if the resolution is less than three or greater than five. PassingNULL
in thecolorTab
orinverseTab
parameter substitutes an appropriate handle from the currentGDevice
data structure, while passing 0 in theres
parameter substitutes the currentGDevice
data structure's inverse table resolution. These defaults can be used in any combination with explicit values, or withNULL
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 inQDError
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.