ImagerPrintColor.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Michael Plass, June 30, 1987 7:32:43 pm PDT
This interface is for printer Imager implementations, and provides the functionality needed for decoding and rendering colors of all kinds. Other clients should not need this interface.
DIRECTORY
ImagerTransformation USING [Transformation],
ImagerBitmapContext USING [Brick],
ImagerColor USING [Color],
ImagerPixel USING [PixelMap],
ImagerSample USING [Function, SampleMap],
PrintColor USING [ColorCorrection, HalftoneProperties, Ink, LogicalDevice, Toner, TonerUniverse],
SF USING [Box, BoxGenerator];
ImagerPrintColor: CEDAR DEFINITIONS
~ BEGIN
ColorCase: TYPE ~ {nil, constant, tile, sampledColor, sampledBlack};
DeviceColorData: TYPE ~ REF DeviceColorDataRep;
DeviceColorDataRep: TYPE ~ RECORD [
logicalDevice: PrintColor.LogicalDevice, -- parameter for SetDeviceColorData
halftoneProperties: PrintColor.HalftoneProperties, -- parameter for SetDeviceColorData
correction: PrintColor.ColorCorrection, -- parameter for SetDeviceColorData
interpolate: BOOLFALSE, -- speed/quality tradeoff parameter for MaskBoxes (for sampledColor case only)
tonerUniverse: PrintColor.TonerUniverse,
toner: PrintColor.Toner, -- toner for current separation
brick: ImagerBitmapContext.Brick, -- the cached brick
sampleMapInUse: ImagerSample.SampleMap, -- to be recycled next time.
case: ColorCase ← constant,
constant =>
ink: PrintColor.Ink, -- ignores tile, alpha, etc.
tile =>
tileBits: ImagerSample.SampleMap ← NIL, -- the tile bitmap
tilePhase: NAT ← 0, -- the tile phase shift for each row
alpha: BYTE ← 255, -- coverage: 0 = none, 255 = full (this may not work)
sampledColor =>
separation: ImagerPixel.PixelMap ← NIL, -- the samples for this separation (may also have alpha)
sampledBlack =>
bitmap: ImagerPixel.PixelMap ← NIL, -- the source bitmap
sampledColor, sampledBlack =>
pixelToDevice: ImagerTransformation.Transformation ← NIL,
tile, sampledBlack =>
function: ImagerSample.Function, -- The only functions that are guaranteed to work for all implementations are [null, null] and [or, null]
private: REFNIL -- not for client use
];
NewDeviceColorData: PROC [logicalDevice: PrintColor.LogicalDevice, halftoneProperties: PrintColor.HalftoneProperties, correction: PrintColor.ColorCorrection ← NIL, interpolate: BOOLFALSE] RETURNS [DeviceColorData];
Sets up a separation-specific color description
SetSeparation: PROC [deviceColorData: DeviceColorData, toner: PrintColor.Toner];
Indicates which separation to work on.
SetDeviceColorData: PROC [deviceColorData: DeviceColorData, color: ImagerColor.Color, viewToDevice: ImagerTransformation.Transformation];
Sets up a separation-specific color description
MaskBoxes: PROC [bitmap: ImagerSample.SampleMap, deviceColorData: DeviceColorData, bounds: SF.Box, boxes: SF.BoxGenerator];
Applies the color to the bitmap.
END.