ImagerPD.mesa
Copyright Ó 1983, 1984, 1985, 1987 by Xerox Corporation. All rights reserved.
Michael Plass, February 24, 1987 5:34:22 pm PST
Doug Wyatt, April 15, 1985 1:59:11 pm PST
Tim Diebert: February 18, 1986 10:31:24 am PST
Eric Nickell February 18, 1986 6:30:52 pm PST
Stone, February 4, 1987 5:01:01 pm PST
Last edited by: Mik Lamming - May 1, 1987 4:48:03 pm PDT
Maureen Stone, May 5, 1987 11:58:16 am PDT
N.B. This interface is subject to change! Except in unusual circumstances, clients should not write PD files, but should write Interpress files instead. Refer to the ImagerInterpress interface to do so.
DIRECTORY
Imager USING [Context],
ImagerBrick USING [Brick],
ImagerColor USING [Color],
ImagerPDPublic USING [Toner, UCR],
ImagerPixel USING [PixelBuffer],
ImagerSample USING [SampleMap],
Rope USING [ROPE];
ImagerPD: CEDAR DEFINITIONS
~ BEGIN OPEN Imager, ImagerColor, ImagerSample, Rope;
Basic types
PD: TYPE ~ REF PDRep;
PDRep: TYPE;
Toner: TYPE ~ ImagerPDPublic.Toner;
Toners: TYPE ~ LIST OF Toner;
PrinterType: TYPE ~ {nil, raven300, raven384, o3, plateMaker, o5, puffin, colorVersatec, versatec, color400, c150, d4020, bw400, o13, o14, o15};
UCR: TYPE ~ ImagerPDPublic.UCR;
Tile: TYPE ~ ImagerBrick.Brick;
RECORD [maxSample: CARDINAL, sampleMap: RasterSampleMap, phase: NAT];
Basic operations
CreateFromParameters: PROC [name: ROPE, deviceCode: CARDINAL, deviceType: ATOM,
sResolution, fResolution: CARDINAL, -- pixels per inch
imageSSize, imageFSize: CARDINAL, -- pixels
toners: Toners, leftovers: BOOL, bandSSize: NAT, maxLoadWords: INT, fontTuning: ROPENIL, tonerUniverse: Toners ← NIL, pixelsPerHalftoneDot: REAL ← 5.0, ucr: UCR ← []] RETURNS [PD];
DoPage: PROC [pd: PD, action: PROC [context: Context], pixelUnits: BOOLFALSE];
UnimplementedColor: SIGNAL [color: Color];
Close: PROC [pd: PD];
Control of color and halftoning properties
CreateTile: PROC [maxSample: CARDINAL, sampleMap: SampleMap, phase: INTEGER ← 0, copy: BOOLTRUE] RETURNS [tile: Tile];
If copy, forces the entire contents to get copied.
SetHalftoneProperties: PROC [pd: PD, toner: Toner, brick: Tile];
CorrectionProc: TYPE = PROC[
pixelsRGB, pixelsCMYK: ImagerPixel.PixelBuffer,
data: REF,
toner: Toner] ;
Takes r,g,b in [0..255] (0=black, 255 = full on) and returns a value for magenta, cyan, yellow or black in the range [0..255] (0=none, 255=full on).
SetColorCorrection: PROC [pd: PD, correctionProc: CorrectionProc, data: REF];
Registers a color correction proc, which will be called once per pixel for each sampled color, and once for each constant color.
END.