DIRECTORY GGBasicTypes, GGSegmentTypes, GGModelTypes, Imager, ImagerPath, ImagerTransformation, Rosary; GGPath: CEDAR DEFINITIONS IMPORTS Imager = BEGIN BoundBox: TYPE = GGBasicTypes.BoundBox; Joint: TYPE = GGSegmentTypes.Joint; Outline: TYPE = GGModelTypes.Outline; Point: TYPE = GGBasicTypes.Point; SelectedObjectData: TYPE = GGModelTypes.SelectedObjectData; FenceHoleOpen: TYPE = {fence, hole, open}; Path: TYPE = REF PathObj; PathObj: TYPE = RECORD [ class: PathClass, data: REF ANY, role: FenceHoleOpen, parent: Outline, boundBox: BoundBox, visibleJoints: BOOL _ TRUE, strokeJoint: Imager.StrokeJoint _ round, loArrow, hiArrow: BOOL _ FALSE, selectedInPart: SelectedObjectData ]; PathClass: TYPE = REF PathClassObj; PathClassObj: TYPE = RECORD [ type: ATOM, buildPath: BuildPathProc, drawBorder: DrawBorderProc, drawBorderTransformSeq: DrawBorderTransformPartsProc ]; BuildPathProc: TYPE = PROC [path: Path, moveTo: ImagerPath.MoveToProc, lineTo: ImagerPath.LineToProc, curveTo: ImagerPath.CurveToProc, conicTo: ImagerPath.ConicToProc, arcTo: ImagerPath.ArcToProc]; DrawBorderProc: TYPE = PROC [path: Path, dc: Imager.Context]; DrawBorderTransformPartsProc: TYPE = PROC [pathD: PathDescriptor, dc: Imager.Context, transform: ImagerTransformation.Transformation]; PathDescriptor: TYPE = REF PathDescriptorObj; PathDescriptorObj: TYPE = RECORD [ path: Path, parts: PathParts ]; PathParts: TYPE = REF ANY; TrajData: TYPE = REF TrajDataObj; TrajDataObj: TYPE = RECORD [ segCount: NAT, segments: Rosary.ROSARY, joints: Rosary.ROSARY, extraPoints: LIST OF Joint ]; FetchPathClass: PROC [type: ATOM] RETURNS [class: PathClass]; Segment: TYPE = GGSegmentTypes.Segment; TrajEnd: TYPE = {lo, hi}; MakeTrajPath: PROC [point: Point] RETURNS [path: Path]; AddSegment: PROC [traj: Path, trajEnd: TrajEnd, seg: Segment, segEnd: TrajEnd] RETURNS [success: BOOL]; MakeCirclePath: PROC [origin: Point, outerPoint: Point, strokeWidth: REAL _ 2.0, strokeColor: Imager.Color _ Imager.black, fillColor: Imager.Color _ NIL] RETURNS [path: Path]; END. 0GGPath.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Last edited by Bier on September 24, 1986 9:32:33 pm PDT Contents: Implements the various path classes in Gargoyle. Paths are parts of outlines. They are the editable versions of what the Imager calls Trajectories. One type of path is the familiar Gargoyle Traj. Traj Moves seg so that the specified end of seg coincides with the specified end of traj. In other words, seg is translated. If success = FALSE, AddSegment sends an error message to GGError and returns. Circle Κη˜J˜Icodešœ ™ Kšœ Οmœ1™