<> <> <> <<>> <> <<>> 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: BOOL _ FALSE, -- 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, <>> ink: PrintColor.Ink, -- ignores tile, alpha, etc. <>> 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) <>> separation: ImagerPixel.PixelMap _ NIL, -- the samples for this separation (may also have alpha) <>> bitmap: ImagerPixel.PixelMap _ NIL, -- the source bitmap <>> pixelToDevice: ImagerTransformation.Transformation _ NIL, <>> function: ImagerSample.Function, -- The only functions that are guaranteed to work for all implementations are [null, null] and [or, null] private: REF _ NIL -- not for client use ]; NewDeviceColorData: PROC [logicalDevice: PrintColor.LogicalDevice, halftoneProperties: PrintColor.HalftoneProperties, correction: PrintColor.ColorCorrection _ NIL, interpolate: BOOL _ FALSE] RETURNS [DeviceColorData]; <> SetSeparation: PROC [deviceColorData: DeviceColorData, toner: PrintColor.Toner]; <> SetDeviceColorData: PROC [deviceColorData: DeviceColorData, color: ImagerColor.Color, viewToDevice: ImagerTransformation.Transformation]; <> MaskBoxes: PROC [bitmap: ImagerSample.SampleMap, deviceColorData: DeviceColorData, bounds: SF.Box, boxes: SF.BoxGenerator]; <> END.