DIRECTORY GraphicsBasic USING [Vec]; PolygonPen: CEDAR DEFINITIONS ~ BEGIN Vec: TYPE ~ GraphicsBasic.Vec; Bezier: TYPE ~ RECORD[b0, b1, b2, b3: Vec]; Pen: TYPE ~ REF PenRec; PenRec: TYPE ~ RECORD[point: SEQUENCE n: NAT OF Vec]; MoveToProc: TYPE ~ PROCEDURE [z0: Vec]; LineToProc: TYPE ~ PROCEDURE [z1: Vec]; CurveToProc: TYPE ~ PROCEDURE [z1, z2, z3: Vec]; -- three Bezier control points. z3 is the new last point. SimpleStroke: PROCEDURE [pen: Vec, curve: Bezier, moveTo: MoveToProc, lineTo: LineToProc, curveTo: CurveToProc]; -- for when the interior of the curve is known never to be parallel to the pen BroadStroke: PROCEDURE [pen: Vec, curve: Bezier, moveTo: MoveToProc, lineTo: LineToProc, curveTo: CurveToProc]; -- for a compound stroke with a broad pen. Dot: PROCEDURE [pen: Pen, point: Vec, moveTo: MoveToProc, lineTo: LineToProc, curveTo: CurveToProc]; Line: PROCEDURE [pen: Pen, startPoint, endPoint: Vec, moveTo: MoveToProc, lineTo: LineToProc, curveTo: CurveToProc]; Stroke: PROCEDURE [pen: Pen, curve: Bezier, moveTo: MoveToProc, lineTo: LineToProc, curveTo: CurveToProc]; END. VPolygonPen.mesa Michael Plass, May 11, 1984 10:11:06 am PDT Beach, February 9, 1985 9:08:33 pm PST This module provides for the conversion of pen-drawn spline curves to spline-bounded outlines. The simplest kind of pen handled here is the broad pen, which is just a line segment. Polygonal-pen strokes are built up by means of multiple broad-pen strokes. The points define the outline of the polygon, with the reference point at the origin. a broad pen is represented as a vector, with the reference point at the origin. The results are sent by calling procedures of the following types: Êh˜Jšœ™šœ,™,J™&—J˜šÏk ˜ Jšœœ˜J˜—Jšœ™J˜Jšœ œ˜J˜Jš˜J˜Jšœœ˜Jšœœœ˜+Jšœœœ˜J˜š œœœœœœ˜5JšœU™UJ˜—JšœO™OJ˜JšœC™CJšÏn œœ œ ˜'Jšž œœ œ ˜'Jšž œœ œÏc9˜jJ˜Jšž œ œZŸN˜¿J˜Jšž œ œZŸ*˜šJ˜Jšžœ œV˜dJ˜Jšžœ œe˜tJ˜Jšžœ œY˜jJ˜Jšœ˜J˜—…—T