ImagerStroke.mesa
Michael Plass, February 6, 1984 1:34:15 pm PST
Edited by Doug Wyatt, November 22, 1983 11:34 am
DIRECTORY
ImagerBasic USING [Bezier, Pair, PathMapType, StrokeEnd, Transformation],
ImagerScanConverter USING [DevicePath, DeviceRectangle];
ImagerStroke: CEDAR DEFINITIONS
~ BEGIN
DevicePath: TYPE ~ ImagerScanConverter.DevicePath;
DeviceRectangle: TYPE ~ ImagerScanConverter.DeviceRectangle;
Bezier: TYPE ~ ImagerBasic.Bezier;
DevicePathFromStroke: PROC [
pathMap: ImagerBasic.PathMapType,
pathData: REF,
clientToDevice: ImagerBasic.Transformation,
width: REAL,
strokeEnd: ImagerBasic.StrokeEnd,
closed: BOOLEAN,
clipBox: DeviceRectangle,
scratch: DevicePath ← NIL -- for re-use of storage
] RETURNS [devicePath: DevicePath];
Subdivide: PROC [bezier: Bezier, vertex: PROC[ImagerBasic.Pair], tolerance: REAL ← 0.5];
FlatBezier: PROC [bezier: Bezier, epsilon: REAL] RETURNS [BOOLEAN];
Split: PROC [bezier: Bezier] RETURNS[firstHalf, secondHalf: Bezier];
END.