NewImagerStroke.mesa
Copyright © 1984, 1985 by Xerox Corporation. All rights reserved.
Michael Plass, May 19, 1985 1:07:07 pm PDT
Doug Wyatt, March 13, 1985 5:31:16 pm PST
DIRECTORY
ImagerPath USING [PathProc, MoveToProc, LineToProc, ConicToProc, CurveToProc],
ImagerPen USING [Pen],
ImagerTransformation USING [Transformation],
Real USING [LargestNumber],
Vector2 USING [VEC];
NewImagerStroke: CEDAR DEFINITIONS
~ BEGIN OPEN ImagerPath, ImagerPen, ImagerTransformation, Vector2;
VertexIndex: TYPE ~ NAT;
bigReal: REAL ~ Real.LargestNumber;
PathFromStroke: PROC [path: PathProc, width: REAL, m: Transformation, moveTo: MoveToProc, lineTo: LineToProc, conicTo: ConicToProc, curveTo: CurveToProc, closed: BOOL, end: INT, joint: INT];
Produces the outline of a stroke in device, view or surface coordinates, given a path for the centerline in client coordinates.
SquareEndWithNoDirection: SIGNAL;
May be raised as an informational signal by PathFromStroke; should be turned into an appearance warning by Interpress.
PenStroke: PROC [path: PathProc, pen: Pen, moveTo: MoveToProc, lineTo: LineToProc, conicTo: ConicToProc, curveTo: CurveToProc, closed: BOOL, end: PROC [p: VEC, v: VEC, i0, i1: VertexIndex], joint: PROC [p: VEC, v0, v1: VEC, i0, i1: VertexIndex]];
This is a more basic routine. Produces the outline of a stroke, given a path for the centerline. The input path is in a coordinate system with one unit per pixel. The output outlines wind counterclockwise in this coordinate system. The pen must be convex.
END.