ImagerPD.mesa
Copyright © 1983, 1984, 1985 by Xerox Corporation. All rights reserved.
Michael Plass, September 18, 1985 4:05:53 pm PDT
Doug Wyatt, April 15, 1985 1:59:11 pm PST
Tim Diebert: September 18, 1985 3:59:19 pm 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],
ImagerColor USING [CIEChromaticity],
ImagerColorDefs USING [Color, ConstantColor],
ImagerPixelMap USING [PixelMap, Tile],
Rope USING [ROPE];
ImagerPD: CEDAR DEFINITIONS
~ BEGIN OPEN Imager, ImagerColor, ImagerColorDefs, ImagerPixelMap, Rope;
Basic types
PD: TYPE ~ REF PDRep;
Toner: TYPE ~ MACHINE DEPENDENT {black(0), cyan(1), magenta(2), yellow(3), last(15)};
Toners:
TYPE ~
LIST
OF Toner;
PrinterType: TYPE ~ {nil, raven300, raven384, o3, plateMaker, o5, puffin, colorVersatec, versatec, color400, c150, o11, o12, o13, o14, o15};
Basic operations
CreateFromPrinterType:
PROC [name:
ROPE, printerType: PrinterType, toners: Toners ←
NIL, tonerUniverse: Toners ←
NIL, pixelsPerHalftoneDot:
REAL ← 5.0]
RETURNS [
PD];
CreateFromParameters:
PROC [name:
ROPE, deviceCode:
CARDINAL,
sResolution, fResolution:
CARDINAL,
-- pixels per inch
imageSSize, imageFSize:
CARDINAL,
-- pixels
toners: Toners, leftovers:
BOOL, bandSSize:
NAT, maxLoadWords:
INT, fontTuning:
ROPE ←
NIL, tonerUniverse: Toners ←
NIL, pixelsPerHalftoneDot:
REAL ← 5.0]
RETURNS [
PD];
DoPage:
PROC [pd:
PD, action:
PROC [context: Context], pixelUnits:
BOOL ←
FALSE];
UnimplementedColor:
SIGNAL [color: Color];
Close: PROC [pd: PD];
Control of color and halftoning properties
CreateTile:
PROC [pixelMap: PixelMap, phase:
INTEGER ← 0, copy:
BOOL ←
TRUE]
RETURNS [tile: Tile];
Like ImagerPixelMap.CreateTile, but does not replicate the pattern.
If copy, forces the entire contents to get copied.
ColorSeparationProc:
TYPE ~
PROC [chrom: CIEChromaticity, luminance:
REAL, toner: Toner, data:
REF]
RETURNS [t:
REAL];
This procedure is used to do the color separation for ordinary colors, i.e., those that can be reasonably specified in terms of CIE parameters.
SpecialSeparationProc:
TYPE ~
PROC [color: ConstantColor, toner: Toner, data:
REF]
RETURNS [tile: Tile, clear:
BOOL];
This procedure is used to do the color separation for other constant colors. It should return a one-bit-per-pixel brick. Use clear=TRUE to specify that the bits should ORed into the page separation bitmap.
SetSeparationProperties:
PROC [pd:
PD, colorSep: ColorSeparationProc, colorData:
REF, specialSep: SpecialSeparationProc, specialData:
REF];
SetHalftoneProperties:
PROC [pd:
PD, toner: Toner, thresholdBrick: Tile];
END.