IPOutput.mesa
Copyright © 1984 Xerox Corporation. All rights reserved.
Doug Wyatt, August 13, 1984 1:00:21 pm PDT
An "operator interface" for writing Interpress masters.
See the Introduction to Interpress, chapter 7.
DIRECTORY
IO USING [STREAM],
IPBasic USING [ImagerVariable, Op, StrokeEnd],
IPWriter USING [Writer],
Rope USING [ROPE];
IPOutput: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
STREAM: TYPE ~ IO.STREAM;
Master: TYPE ~ REF MasterRep;
MasterRep: TYPE ~ RECORD[writer: IPWriter.Writer, state: MasterState, page: INT ← 0];
MasterState: TYPE ~ {new, begin, end, closed};
Open: PROC[fileName: ROPE, encoding: ATOM ← NIL] RETURNS[Master];
OpenFromStream:
PROC[stream:
STREAM, encoding:
ATOM ←
NIL]
RETURNS[Master];
possible encodings are $Xerox (the default), $Written
BeginPreamble, EndPreamble: PROC[self: Master];
BeginPage, EndPage: PROC[self: Master];
Close: PROC[self: Master];
PutOp: PROC[self: Master, op: IPBasic.Op];
PutInt: PROC[self: Master, int: INT];
PutReal: PROC[self: Master, real: REAL];
PutId: PROC[self: Master, id: ROPE];
PutName:
PROC[self: Master, name:
ROPE];
Parses a hierarchical name and makes a Vector of Identifiers.
Identifiers should be separated by "/", as in "xerox/pressfonts/timesroman/mrr".
PutChar: PROC[self: Master, char: CARDINAL];
PutRope: PROC[self: Master, rope: ROPE, start: INT ← 0, len: INT ← INT.LAST];
PutText:
PROC[self: Master, text:
REF
READONLY
TEXT, start:
NAT ← 0, len:
NAT ←
NAT.
LAST];
For rope and text, '\377 is treated as an escape code; see the Xerox Character Code Standard.
Get: PROC[self: Master, j: INT];
MakeVec: PROC[self: Master, n: INT];
MakeVecLU: PROC[self: Master, l, u: INT];
Shape: PROC[self: Master];
GetProp: PROC[self: Master, id: ROPE];
GetP: PROC[self: Master, id: ROPE];
MergeProp: PROC[self: Master];
Frame: PROC[self: Master];
FGet: PROC[self: Master, j: INT];
FSet: PROC[self: Master, j: INT];
PoolOp: PROC[self: Master];
Pool: PROC[self: Master];
PGet: PROC[self: Master, j: INT];
PSet: PROC[self: Master, j: INT];
Env: PROC[self: Master];
MakePool: PROC[self: Master];
NoPool: PROC[self: Master];
MakeCO: PROC[self: Master, body: PROC];
MakeSimpleCO: PROC[self: Master, body: PROC];
Do: PROC[self: Master];
DoSave: PROC[self: Master];
DoSaveAll: PROC[self: Master];
DoBody: PROC[self: Master, body: PROC];
DoSaveBody: PROC[self: Master, body: PROC];
DoSaveAllBody: PROC[self: Master, body: PROC];
DoSaveSimpleBody: PROC[self: Master, body: PROC];
Pop: PROC[self: Master];
Copy: PROC[self: Master, depth: INT];
Dup: PROC[self: Master];
Roll: PROC[self: Master, depth, moveFirst: INT];
Exch: PROC[self: Master];
Mark: PROC[self: Master, n: INT];
Unmark: PROC[self: Master, n: INT];
Unmark0: PROC[self: Master];
Count: PROC[self: Master];
If: PROC[self: Master, body: PROC];
IfElse: PROC[self: Master, body: PROC];
IfCopy: PROC[self: Master, body: PROC];
IGet: PROC[self: Master, var: IPBasic.ImagerVariable];
ISet: PROC[self: Master, var: IPBasic.ImagerVariable];
SetPriorityImportant: PROC[self: Master, priorityImportant: BOOL];
SetStrokeWidth: PROC[self: Master, strokeWidth: REAL];
SetStrokeEnd: PROC[self: Master, strokeEnd: IPBasic.StrokeEnd];
SetAmplifySpace: PROC[self: Master, amplifySpace: REAL];
SetCorrectShrink: PROC[self: Master, correctShrink: REAL];
MakeT: PROC[self: Master, a, b, c, d, e, f: REAL];
Translate: PROC[self: Master, x, y: REAL];
Rotate: PROC[self: Master, a: REAL];
Scale: PROC[self: Master, s: REAL];
Scale2: PROC[self: Master, sx, sy: REAL];
Concat: PROC[self: Master];
ConcatT: PROC[self: Master];
TranslateT:
PROC[self: Master, x, y:
REAL];
x y TRANSLATE CONCATT
RotateT:
PROC[self: Master, a:
REAL];
a ROTATE CONCATT
ScaleT:
PROC[self: Master, s:
REAL];
s SCALE CONCATT
Scale2T:
PROC[self: Master, sx, sy:
REAL];
sx sy SCALE2 CONCATT
Move: PROC[self: Master];
Trans: PROC[self: Master];
ShowRope: PROC[self: Master, rope: ROPE, start, len: INT, xrel: BOOL ← FALSE];
ShowText: PROC[self: Master, text: REF READONLY TEXT, start, len: NAT, xrel: BOOL ← FALSE];
ShowChar: PROC[self: Master, char: CARDINAL];
SetXY: PROC[self: Master, x, y: REAL];
SetXYRel: PROC[self: Master, x, y: REAL];
SetXRel: PROC[self: Master, x: REAL];
SetYRel: PROC[self: Master, y: REAL];
MakeGray: PROC[self: Master, f: REAL];
FindColor: PROC[self: Master, name: ROPE];
FindColorOperator: PROC[self: Master, name: ROPE];
FindColorModelOperator: PROC[self: Master, name: ROPE];
SetGray: PROC[self: Master, f: REAL];
MoveTo: PROC[self: Master, x, y: REAL];
LineTo: PROC[self: Master, x, y: REAL];
LineToX: PROC[self: Master, x: REAL];
LineToY: PROC[self: Master, y: REAL];
CurveTo: PROC[self: Master, x1, y1, x2, y2, x3, y3: REAL];
ConicTo: PROC[self: Master, x1, y1, x2, y2: REAL, e: REAL];
ArcTo: PROC[self: Master, x1, y1, x2, y2: REAL];
MakeOutline: PROC[self: Master, n: INT];
MaskFill: PROC[self: Master];
MaskFillOutline:
PROC[self: Master, n:
INT ← 1];
n MAKEOUTLINE MASKFILL
MaskStroke: PROC[self: Master];
MaskStrokeClosed: PROC[self: Master];
MaskVector: PROC[self: Master, x1, y1, x2, y2: REAL];
MaskRectangle: PROC[self: Master, x, y, w, h: REAL];
StartUnderline: PROC[self: Master];
MaskUnderline: PROC[self: Master, dy, h: REAL];
FindFont: PROC[self: Master, name: ROPE];
ModifyFont: PROC[self: Master];
SetupFont:
PROC[self: Master, n:
INT, name:
ROPE, scale:
REAL];
[name] FINDFONT scale SCALE MODIFYFONT n FSET
SetFont: PROC[self: Master, n: INT];
CorrectMask: PROC[self: Master];
CorrectSpace: PROC[self: Master, x, y: REAL];
Correct: PROC[self: Master, body: PROC];
SetCorrectMeasure: PROC[self: Master, x, y: REAL];
SetCorrectTolerance: PROC[self: Master, x, y: REAL];
Space: PROC[self: Master, x: REAL];
END.