UFCubicScan.mesa
Created February 16, 1983
Edited by Michael Plass, February 23, 1983 2:00 pm
DIRECTORY
GraphicsBasic,
Scaled
;
UFCubicScan: CEDAR DEFINITIONS = BEGIN
Cubic: TYPE = REF CubicRec;
CubicRec: TYPE = RECORD [
xmin, ymin, ymax: INTEGER, -- in device units
x0, y0, x1, y1, x2, y2, x3, y3: CARDINAL,
The bezier points are given relative to (xmin-1/2, ymin) in units 1/256 the size of device units. Must have y0 <= y1 <= y3 and y0 <= y2 <= y3.
ascending: BOOLEAN,
openAt0: BOOLEAN,
openAt3: BOOLEAN,
outlineNumber: [0..8192)
];
DevicePath: TYPE = REF DevicePathRec;
DevicePathRec: TYPE = RECORD [
length: NAT ← 0,
numberOfOutlines: NAT ← 0,
seq: REF DevicePathSeqRec
];
DevicePathSeqRec: TYPE = RECORD [
SEQUENCE maxLength: NAT OF Cubic
];
XValueFor: PROCEDURE [cubic: CubicRec, y: Scaled.Value] RETURNS [INTEGER];
Allocate: PROCEDURE RETURNS [DevicePath];
Reset: PROCEDURE [devicePath: DevicePath];
Release: PROCEDURE [devicePath: DevicePath];
PushPath: PROCEDURE [
devicePath: DevicePath,
path: GraphicsBasic.Path,
map: PROC [GraphicsBasic.Vec] RETURNS [GraphicsBasic.Vec] ← NIL
];
PopPath: PROCEDURE [devicePath: DevicePath];
ScanConvert: PROCEDURE [devicePath: DevicePath, LineProc: PROC[xmin, xmax, y: INTEGER]];
END.