DIRECTORY CGCubic USING [Bezier], Vector USING [Vec]; PolygonPen: DEFINITIONS = BEGIN Pen: TYPE = REF PenRec; PenRec: TYPE = RECORD[point: SEQUENCE n:NAT OF Vector.Vec]; Bezier: TYPE = CGCubic.Bezier; -- RECORD[b0,b1,b2,b3: Vec]; Vec: TYPE = Vector.Vec; -- RECORD[x,y: REAL]; 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: Vector.Vec, moveTo: MoveToProc, lineTo:LineToProc, curveTo:CurveToProc]; Line: PROCEDURE [pen: Pen, startPoint,endPoint: Vector.Vec, moveTo: MoveToProc, lineTo:LineToProc, curveTo:CurveToProc]; Stroke: PROCEDURE [pen: Pen, curve: Bezier, moveTo: MoveToProc, lineTo:LineToProc, curveTo:CurveToProc]; END. ,PolygonPen.mesa Michael Plass, December 8, 1982 10:10 am 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: ʃ˜Jšœ™Jšœ)™)J˜šÏk ˜ Jšœœ ˜Jšœœ˜J˜—Jšœ™J˜Jšœ œ˜J˜Jš˜J˜Jšœœœ˜J˜š œœœœœœ ˜;JšœU™UJ˜—JšœœÏcÐckž˜;J˜JšœœžŸžŸž˜-J˜JšœO™OJ˜JšœB™BJšÏn œœ œ ˜'Jš  œœ œ ˜'Jš  œœ œž9˜jJ˜Jš  œ œXžN˜½J˜Jš  œ œXž*˜˜J˜Jš œ œ[˜iJ˜Jš œ œi˜xJ˜Jš œ œW˜hJ˜Jšœ˜J˜—…—Š9