CTab2PaletteCopies the colors of a color table into a palette.
pascal void CTab2Palette( CTabHandle srcCTab, PaletteHandle dstPalette, short srcUsage, short srcTolerance);
- A handle to the color table whose colors are to be copied. Color tables are described in the chapter "Color QuickDraw" of Inside Macintosh: Imaging With QuickDraw.
- The palette to receive the colors.
- A usage constant to be assigned the palette entries. Usage constants are described in "Usage Constants" (page 1-3).
- A tolerance value to be assigned the palette entries.
CTab2Palettefunction copies the fields from an existing color-table structure into an existing palette structure. If the structures are not the same size, then
CTab2Paletteresizes the palette structure to match the number of entries in the color-table structure. If the palette in
dstPalettehas any entries allocated for animation on any screen device, they are relinquished before the new colors are copied. The
srcToleranceparameters are the value that you assign to the new colors.
If you want to use color-table animation, you can use
AnimateEntry(page 1-20) and
AnimatePalette(page 1-21) to change the colors in a palette and on corresponding devices. Changes made to a palette by
CTab2Palettedon't take effect until the next
ActivatePalettefunction is performed. If either the color-table handle or the palette handle is