PDFileWriter.mesa
Copyright Ó 1984, 1985, 1987 by Xerox Corporation. All rights reserved.
Michael Plass, February 6, 1987 5:54:04 pm PST
Doug Wyatt, March 7, 1985 2:33:08 pm PST
~
BEGIN
PDState: TYPE ~ REF PDStateRec;
PDStateRec: TYPE;
DeviceCode: TYPE ~ PDFileFormat.DeviceCode;
Toner: TYPE ~ PDFileFormat.Toner;
LoadReference: TYPE ~ NAT;
LoadReferenceRep:
TYPE ~
RECORD [
assignedLoadAddress: INT ← -1,
sSize, fSize: CARDINAL,
data:
SELECT tag: *
FROM
samples => [],
tile => [],
runGroup => [],
ENDCASE
];
TFlag:
TYPE ~ {opaque, transparent};
Creating a new PD file.
Create:
PROC [fileName: Rope.
ROPE, deviceCode: DeviceCode, sResolution, fResolution, imageSSize, imageFSize:
CARDINAL, bandSSize:
CARDINAL ← 16, copies:
CARDINAL ← 1, leftOverMode:
BOOLEAN ←
TRUE, maxLoadWords:
INT ← 60000]
RETURNS [pdState: PDState];
SetPriorityImportant:
PROC [pdState: PDState, priorityImportant:
BOOLEAN]
RETURNS [previousValue: BOOLEAN];
priorityImportant is initially FALSE
TonerSet: TYPE ~ PACKED ARRAY Toner OF BOOL ← ALL[FALSE];
StartImage:
PROC [pdState: PDState, toners: TonerSet, feed, strip:
BOOLEAN ←
TRUE];
This interface may be used to create color PD files either one layer at a time, or all layers simultaneously. The toners parameter specifies which layers are to be created in the current pass; feed applies to the first of the layers, and strip to the last. The call to StartImage may be omitted if only the black separation is desired.
Setting the current color.
SetColorInk:
PROC [pdState: PDState, toner: Toner];
SetColorClear:
PROC [pdState: PDState, toner: Toner];
SetColorOff:
PROC [pdState: PDState, toner: Toner];
Masking commands have no effect for the specified toner until a new color is set for it.
SetColorTile:
PROC [pdState: PDState, toner: Toner, tileRef: LoadReference, tFlag: TFlag ← opaque];
Imaging operators.
MaskRectangle:
PROC [pdState: PDState, sMin, fMin:
CARDINAL, sSize, fSize:
CARDINAL];
MaskTrapezoid:
PROC [pdState: PDState, sMin, sSize:
CARDINAL, fMin, fSize:
CARDINAL, fMinLast, fSizeLast:
CARDINAL];
MaskSamplesRef:
PROC [pdState: PDState, samplesRef: LoadReference, sMin, fMin:
CARDINAL];
MaskSamples:
PROC [pdState: PDState, sMin
, fMin:
CARDINAL, sSize, fSize:
CARDINAL, deliverProc: DeliverSampleArrayProc];
MaskRunGroupRef:
PROC [pdState: PDState, runGroupRef: LoadReference, sMin, fMin:
CARDINAL];
MaskRunGroup:
PROC [pdState: PDState, deliverProc: DeliverRunGroupProc];
NewPriorityLevel:
PROC [pdState: PDState, toner: Toner];
ColorSamples:
PROC [pdState: PDState, toner: Toner, sMin
, fMin:
CARDINAL, sSize, fSize:
CARDINAL, deliverProc: DeliverSampleArrayProc, tFlag: TFlag ← opaque];
Load management.
RemainingLoadSize:
PROC [pdState: PDState]
RETURNS [words:
INT];
Tells the amount of load the writer can be sure is available.
LoadRunGroup:
PROC [pdState: PDState, deliverProc: DeliverRunGroupProc]
RETURNS [loadReference: LoadReference];
LoadContiguousSampleArray:
PROC [pdState: PDState, sSize, fSize:
CARDINAL, bitsPtr:
LONG
POINTER]
RETURNS [loadReference: LoadReference];
LoadContiguousColorTile:
PROC [pdState: PDState, phase:
CARDINAL, sMin, fMin:
CARDINAL, sSize, fSize:
CARDINAL, bitsPtr:
LONG
POINTER]
RETURNS [loadReference: LoadReference];