Types
Any:
TYPE ~
RECORD [
executable: BOOL,
variant:
SELECT type: Type
FROM
null => [],
integer => [int: INT],
real => [real: REAL],
boolean => [bool: BOOL],
array => [access: Access, finger: ArrayFinger, start, length: ArrayIndex],
string => [access: Access, finger: StringFinger, start, length: StringIndex],
name => [id: NameID],
dict => [finger: DictFinger],
operator => [op: Op],
file => [access: Access, id: StreamID],
mark => [stop: BOOL ← FALSE],
save => [level: Level],
fontID => [],
ENDCASE
];
null: Any ~ [executable: FALSE, variant: null[]];
Array: TYPE ~ Any[array];
Proc: TYPE ~ Array; -- executable
String: TYPE ~ Any[string];
Name: TYPE ~ Any[name];
Dict: TYPE ~ Any[dict];
Operator: TYPE ~ Any[operator];
File: TYPE ~ Any[file];
Type: TYPE ~ {null, integer, real, boolean, array, string, name, dict, operator, file, mark, save, fontID, stop};
Access:
TYPE ~ {none, executeOnly, readOnly, unlimited};
Level: TYPE ~ CARDINAL;
ArrayIndex: TYPE ~ CARDINAL;
ArrayFinger: TYPE ~ LONG POINTER TO ArrayDescriptor;
ArrayDescriptor: TYPE ~ RECORD [pointer: ArrayPointer, size: ArrayIndex];
ArrayPointer: TYPE ~ LONG POINTER TO ArrayBody;
ArrayBody: TYPE ~ RECORD [SEQUENCE COMPUTED ArrayIndex OF Any];
StringIndex: TYPE ~ CARDINAL;
StringFinger: TYPE ~ LONG POINTER TO StringDescriptor;
StringDescriptor: TYPE ~ RECORD [pointer: StringPointer, size: StringIndex];
StringPointer: TYPE ~ LONG POINTER TO StringBody;
StringBody: TYPE ~ RECORD [PACKED SEQUENCE COMPUTED StringIndex OF CHAR];
DictIndex: TYPE ~ CARDINAL;
DictFinger: TYPE ~ LONG POINTER TO DictPointer;
DictPointer: TYPE ~ LONG POINTER TO DictBody;
DictBody: TYPE ~ RECORD [access: Access, maxLength, length: DictIndex,
tuples: SEQUENCE COMPUTED DictIndex OF Tuple];
TuplePointer: TYPE ~ LONG POINTER TO Tuple;
Tuple: TYPE ~ RECORD [key: Any, value: Any];
NameID: TYPE ~ CARDINAL;
StreamID: TYPE ~ CARDINAL;
Op: TYPE ~ PROC [self: Root];
Error: ERROR [errorName: Name];
ErrorType: TYPE ~ {dictfull, dictstackoverflow, dictstackunderflow, execstackoverflow, handleerror, interrupt, invalidaccess, invalidexit, invalidfileaccess, invalidfont, invalidrestore, ioerror, limitcheck, nocurrentpoint, rangecheck, stackoverflow, stackunderflow, syntaxerror, timeout, typecheck, undefined, undefinedfilename, undefinedresult, unmatchedmark, unregistered, VMerror};
Stack: TYPE ~ LONG POINTER TO StackDescriptor;
StackDescriptor:
TYPE ~
RECORD [
pointer: ArrayPointer,
count, size: ArrayIndex,
underflow, overflow: Name
];
Root: TYPE ~ REF RootRep;
RootRep:
TYPE ~
RECORD [
zone: UNCOUNTED ZONE,
vm: CountedVM.Handle,
pointer: LONG POINTER,
ostack, estack, dstack: Stack,
xfor: Operator,
xrepeat: Operator,
xloop: Operator,
xforall: Operator,
random: Random.RandomStream,
imager: Imager.Context
];
Path: TYPE ~ REF PathRep;
PathRep: TYPE ~ RECORD [subPaths: LIST OF SubPath];
SubPath: TYPE ~ REF SubPathRep;
SubPathRep: TYPE ~ RECORD [closed: BOOL, points: LIST OF PathPoint];
PathPoint: TYPE ~ REF PathPointRep;
PathPointRep: TYPE ~ RECORD [control: BOOL, p: VEC];
LineCap: TYPE ~ Imager.StrokeEnd; -- {butt, round, square}
LineJoin: TYPE ~ Imager.StrokeJoint; -- {miter, round, bevel}
DashIndex: TYPE ~ [0..dashLimit);
DashArray: TYPE ~ ARRAY [0..dashLimit) OF REAL;
GState: TYPE ~ REF GStateRep;
GStateRep:
TYPE ~
RECORD [
CTM: Imager.Transformation,
color: Imager.ConstantColor,
position: VEC,
path: Path,
clipPath: Path,
font: Dict,
lineWidth: REAL,
lineCap: LineCap,
lineJoin: LineJoin,
screen: HalftoneScreen,
transfer: Proc, -- proc
flatness: REAL,
miterLimit: REAL,
dashPatternLength: ArrayIndex,
dashPatternArray: REF DashArray,
device: xxx
];