ImagerStroke.mesa
Copyright © 1984, 1985 by Xerox Corporation. All rights reserved.
Michael Plass, May 19, 1985 1:07:07 pm PDT
Doug Wyatt, May 19, 1985 4:22:10 pm PDT
DIRECTORY
ImagerPath USING [PathProc, MoveToProc, LineToProc, CurveToProc, ConicToProc],
ImagerPen USING [Pen],
ImagerTransformation USING [Transformation],
Real USING [LargestNumber],
Vector2 USING [VEC];
ImagerStroke: CEDAR DEFINITIONS
~
BEGIN
VEC: TYPE ~ Vector2.VEC;
bigReal:
REAL ~ Real.LargestNumber;
PathFromStroke:
PROC [path: ImagerPath.PathProc, closed:
BOOL,
width:
REAL, end:
INT, joint:
INT, m: ImagerTransformation.Transformation,
moveTo: ImagerPath.MoveToProc, lineTo: ImagerPath.LineToProc,
conicTo: ImagerPath.ConicToProc, curveTo: ImagerPath.CurveToProc
];
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: ImagerPath.PathProc, pen: ImagerPen.Pen, closed:
BOOL,
moveTo: ImagerPath.MoveToProc, lineTo: ImagerPath.LineToProc,
conicTo: ImagerPath.ConicToProc, curveTo: ImagerPath.CurveToProc,
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.