Important: The information in this document is obsolete and should not be used for new development.
 
  
  
  
 
GetCTable
To get a color table stored in a'clut'resource, use theGetCTablefunction.
FUNCTION GetCTable (ctID: Integer): CTabHandle;
ctID- The resource ID of a
'clut'resource.DESCRIPTION
For the color table defined in the'clut'resource that you specify in thectIDparameter, theGetCTablefunction returns a handle to aColorTablerecord. If the'clut'resource with that ID is not found,GetCTablereturnsNIL.If you place this handle in the
pmTablefield of aPixMaprecord, you should first use theDisposeCTableprocedure to dispose of the handle already there.If you modify a
ColorTablerecord, you should invalidate it by changing itsctSeedfield. An easy way to do this is with theCTabChangedprocedure, described on page 4-88.The
GetCTablefunction recognizes a number of standard'clut'resource IDs. You can obtain the default grayscale color table for a given pixel depth by callingGetCTable, adding 32 (decimal) to the pixel depth, and passing this value in thectIDparameter, as shown in Table 4-5.
For full color, you can obtain the default color tables by adding 64 to the pixel depth and passing this in the
ctIDparameter, as shown in Table 4-6. These default color tables are illustrated in Plate 1 at the front of this book.
SPECIAL CONSIDERATIONS
TheGetCTablefunction may move or purge memory blocks in the application heap. Your application should not call this function at interrupt time.SEE ALSO
The'clut'resource is described on page 4-94.
 
  
  
 