ImagerPen.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Michael Plass, May 1, 1985 10:50:32 am PDT
Doug Wyatt, May 19, 1985 4:12:33 pm PDT
DIRECTORY
Vector2 USING [VEC],
ImagerTransformation USING [Transformation];
ImagerPen: CEDAR DEFINITIONS
~ BEGIN
VEC: TYPE ~ Vector2.VEC;
Transformation: TYPE ~ ImagerTransformation.Transformation;
Pen: TYPE ~ REF PenRep;
PenRep: TYPE ~ RECORD [SEQUENCE size: NAT OF VEC];
Treat as immutable.
Degrees: TYPE ~ REAL;
MakeTransformedCircle: PROC [strokeWidth: REAL, m: Transformation] RETURNS [Pen];
A convenience; the translation part of m is ignored.
MakeEllipse: PROC [majorAxis, minorAxis: REAL, theta: Degrees] RETURNS [Pen];
The resulting Pen has each vertex on a half-integer, and is convex and symmetric around the origin. There are no duplicate or redundant vertices. The vertices are chosen to yield a consistent stoke width, using a method developed by John Hobby and Donald Knuth for Metafont 84.
END.