ImagerDitherContext.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Michael Plass, July 3, 1985 11:27:38 am PDT
DIRECTORY
Imager USING [Context],
ImagerColorDefs USING [ConstantColor],
ImagerColorMap USING [MapEntry],
ImagerDitheredDevice USING [SpecialPixel];
ImagerDitherContext: CEDAR DEFINITIONS
~ BEGIN
Modifying Dithering Maps
MapEntries: TYPE ~ LIST OF ImagerColorMap.MapEntry;
Treat this as immutable.
SetDitherMap: PROC [context: Imager.Context, mapEntries: MapEntries];
Fast if mapEntries have been loaded recently.
Does not change the display's color map; see ImagerColorMap.LoadEntries
NOT subject to DoSave, so should be used with caution when dealing with Viewers.
NOP for non-dithered contexts.
DoWithDitherMap: PROC [context: Imager.Context, mapEntries: MapEntries, action: PROC];
Fast if mapEntries have been loaded recently.
Does not change the display's color map; see ImagerColorMap.LoadEntries
Channel Value Colors
ConstantColor: TYPE ~ ImagerColorDefs.ConstantColor;
SpecialPixel: TYPE ~ ImagerDitheredDevice.SpecialPixel;
RECORD [value: Terminal.ChannelValue, dstFunc: PrincOps.DstFunc];
MakeSpecialColor: PROC [ordinaryColor: ConstantColor, specialPixel: SpecialPixel] RETURNS [ConstantColor];
For color map animation; sets a color that will cause the value to be stored in the frame with the specified dstFunc. Will act like ordinaryColor on other devices. The client is responsible for making sure the color map is set up appropriately.
END.