TerminalExtras.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Doug Wyatt, June 9, 1986 3:35:38 pm PDT
DIRECTORY
ColorDisplayDefs USING [ChannelValue],
ColorDisplayDefsExtras USING [ColorTripleArray, ColorValueArray],
Terminal USING [Virtual];
TerminalExtras: CEDAR DEFINITIONS
~ BEGIN
ChannelValue: TYPE ~ ColorDisplayDefs.ChannelValue;
ColorTripleArray: TYPE ~ ColorDisplayDefsExtras.ColorTripleArray;
ColorValueArray: TYPE ~ ColorDisplayDefsExtras.ColorValueArray;
Virtual: TYPE ~ Terminal.Virtual;
Color Maps
SetColorArray: PROC [vt: Virtual, bChannelValue: ChannelValue ← 0,
array: REF ColorTripleArray];
Equivalent to (but faster than)
FOR aChannelValue IN ChannelValue DO
t: ColorTriple ~ array[aChannelValue];
SetColor[vt, aChannelValue, bChannelValue, t.red, t.green, t.blue];
ENDLOOP.
SetRedMapArray: PROC [vt: Virtual, array: REF ColorValueArray];
SetGreenMapArray: PROC [vt: Virtual, array: REF ColorValueArray];
SetBlueMapArray: PROC [vt: Virtual, array: REF ColorValueArray];
Equivalent to (but faster than)
FOR in IN ChannelValue DO
out: ColorValue ~ array[in];
Set(Red|Green|Blue)Map[vt, in, out];
ENDLOOP.
END.