CDPDPlot.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, July 31, 1986 10:51:04 am PDT
Last Edited by: Christian Jacobi, December 8, 1986 6:57:22 pm PST
DIRECTORY
PDFileFormat USING [Toner, DeviceCode],
PDFileWriter USING [TonerSet],
CD USING [Design, Rect, ContextFilter, Layer, Instance],
Rope USING [ROPE];
CDPDPlot: CEDAR DEFINITIONS =
BEGIN
THIS MODULE MAY CHANGE OUTSIDE THE RELEASE CYCLE
TonerKeys: TYPE = ARRAY PDFileFormat.Toner OF REF;
PageMode: TYPE = {fixedPage, finiteStripe, anyStripe};
DeviceDesc: TYPE = RECORD [
--fields for PDFileWriter.Create
deviceCode: PDFileFormat.DeviceCode ← last,
sResolution: CARDINAL,
fResolution: CARDINAL,
imageSSize: CARDINAL,
imageFSize: CARDINAL,
bandSSize: CARDINAL,
copies: CARDINAL ← 1,
leftOverMode: BOOLEANTRUE,
maxLoadWords: INT ← 60000,
--fields for this module
maxPixPerLambda: INT ← -1,
stippleKey: ATOM,
name: Rope.ROPE ← NIL,
toners: PDFileWriter.TonerSet ← ALL[FALSE],
pageMode: PageMode,
pageSlowSize: CARDINAL,
overlap: CARDINAL ← 30, -- number of pixels by which to overlap strips
tonerToKey: REF TonerKeys ← NIL, --key to get color stipples as properties of the layer
contextFilter: REF CD.ContextFilter,
unusedYet: REFNIL
];
TaskDesc: PUBLIC TYPE = RECORD [
design: CD.Design,
instance: CD.Instance ← NIL,
--Uses design if instance defaulted to NIL
--Instance and object will be plotted, but not modified
--Assumes clip and instance to be in same coordinate system
dd: REF DeviceDesc ← NIL,
fileName: Rope.ROPENIL,
clip: CD.Rect ← [0, 0, -1, -1],
substituteFonts: BOOLTRUE,
scale: REAL ← -1,
abort: REF BOOLNIL,
strips: NAT ← 1
];
MakeDevice: PROC [key: ATOM] RETURNS [dd: REF DeviceDesc];
--returns a new DeviceDesc, may be edited
Plot: PROC [task: REF TaskDesc];
--side effects, overwrites task and DeviceDesc
--for interpreter usage
fiddleDevice: REF DeviceDesc;
--may be provided by client, is returned by MakeDevice[$PDPlotUserDevice]
--must be reset somehow, because MakeDevice allowed edits...
Start: PROC[tech, device, b, c, m, y: ATOM, text: Rope.ROPENIL, invert: BOOLFALSE];
End: PROC [];
--start and end privide protection against multiple set up processes interfering
Layer: PROC [uniqueKey: ATOM];
LayerNumber: PROC [layer: CD.Layer];
Color1: PROC [key: ATOM];
Color4: PROC [key: ATOM, i0, i1, i2, i3: [0..16)];
Color8: PROC [key: ATOM, i0, i1, i2, i3, i4, i5, i6, i7: [0..256)];
END.