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
TheSetEntryUsage
function stores the usage and tolerance values specified by thesrcUsage
andsrcTolerance
parameters into the palette entry specified by thedstEntry
parameter.SetEntryUsage
marks 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 eithersrcUsage
orsrcTolerance
is set to $FFFF (-1), the entries are not changed.This function allows you to easily modify a palette created with
NewPalette
or modified byCTab2Palette
. For such palettes theciUsage
andciTolerance
fields of theColorInfo
structure are the same because you can designate only one value for each. You typically callSetEntryUsage
afterNewPalette
orCTab2Palette
to adjust and customize your palette.SEE ALSO
For an example of using theSetEntryUsage
function 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.