Important: The information in this document is obsolete and should not be used for new development.
SetEntryUsage
Modifies the usage category and tolerance values of a palette entry.
pascal void SetEntryUsage( PaletteHandle dstPalette, short dstEntry, short srcUsage, short srcTolerance);
dstPalette- A handle to the palette to be modified.
dstEntry- The palette entry.
srcUsage- The new usage value; one or more usage constants.
srcTolerance- The new tolerance value.
DISCUSSION
TheSetEntryUsagefunction stores the usage and tolerance values specified by thesrcUsageandsrcToleranceparameters into the palette entry specified by thedstEntryparameter.SetEntryUsagemarks the entry as having changed, but it does not change the color environment. The change occurs upon the next call toActivatePalette. Modified entries are marked such that the palette is updated even though no update is required by a change in the color environment. If eithersrcUsageorsrcToleranceis set to $FFFF (-1), the entries are not changed.This function allows you to easily modify a palette created with
NewPaletteor modified byCTab2Palette. For such palettes theciUsageandciTolerancefields of theColorInfostructure are the same because you can designate only one value for each. You typically callSetEntryUsageafterNewPaletteorCTab2Paletteto adjust and customize your palette.SEE ALSO
For an example of using theSetEntryUsagefunction to change the usage and tolerance of a color in a palette, see Listing 1-3 (page 1-25) in Advanced Color Imaging on the Mac OS.