ImagerHighlightContextBackdoor.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Michael Plass, June 29, 1992 9:47 am PDT
~
BEGIN
ColorLookupTable: TYPE ~ REF ColorLookupTableRep;
ColorLookupTableRep:
TYPE ~
RECORD [
toner: ATOM, -- for informational purposes
tablePointer: POINTER TO ColorLookupArray, -- the data, as read from the file
ref: REF ← NIL -- may be used, for example, to prevent premature gc of table - not used by impl
];
RedIndex: TYPE ~ [0..64);
GreenIndex: TYPE ~ [0..64);
BlueIndex:
TYPE ~ [0..64);
ColorLookupArray:
TYPE ~
PACKED
ARRAY RedIndex
OF
PACKED
ARRAY GreenIndex
OF
PACKED
ARRAY BlueIndex
OF ColorLookupEntry;
ColorLookupEntry:
TYPE ~
MACHINE
DEPENDENT
RECORD [
highlight: BYTE,
black: BYTE
];
HighlightContext:
TYPE ~ Imager.Context;
-- as created by ImagerHighlightContext.Create; NOP on other contexts.
SetColorLookupTable:
PROC [context: HighlightContext, colorLookupTable: ColorLookupTable];
Installs a color lookup table - if one of these is in effect, it is used instead of the algorithmic color mapping routines. Setting NIL will revert to the default behavior. It is the client's responsibility to ensure that the colorLookupTable is appropriate for the current toner.
This call should be followed by a SetColor.