DIRECTORY GGBasicTypes, GGInterfaceTypes, GGModelTypes, GGSegmentTypes, Imager, ImagerTransformation; GGOutline: CEDAR DEFINITIONS IMPORTS Imager = BEGIN GargoyleData: TYPE = GGInterfaceTypes.GargoyleData; Joint: TYPE = GGSegmentTypes.Joint; Outline: TYPE = GGModelTypes.Outline; OutlineClass: TYPE = GGModelTypes.OutlineClass; OutlineDescriptor: TYPE = GGModelTypes.OutlineDescriptor; TrajPartType: TYPE = GGModelTypes.TrajPartType; Point: TYPE = GGBasicTypes.Point; Scene: TYPE = GGModelTypes.Scene; Segment: TYPE = GGSegmentTypes.Segment; SelectionClass: TYPE = GGInterfaceTypes.SelectionClass; Sequence: TYPE = GGModelTypes.Sequence; SliceParts: TYPE = GGModelTypes.SliceParts; SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor; Traj: TYPE = GGModelTypes.Traj; TrajEnd: TYPE = GGModelTypes.TrajEnd; TrajGenerator: TYPE = GGModelTypes.TrajGenerator; OutlineParts: TYPE = REF OutlinePartsObj; OutlinePartsObj: TYPE = RECORD [ seqs: LIST OF Sequence ]; HitType: TYPE = GGModelTypes.TrajPartType; OutlineHitData: TYPE = REF OutlineHitDataObj; OutlineHitDataObj: TYPE = RECORD [ traj: Traj, hitType: HitType, segNum: INT, cpNum: INT, jointNum: INT, hitPoint: Point ]; FetchSliceClass: PROC [name: ATOM] RETURNS [class: OutlineClass]; CreateOutline: PROC [traj: Traj, lineEnds: Imager.StrokeEnd _ square, fillColor: Imager.Color _ Imager.black] RETURNS [outline: Outline]; AddHole: PROC [outline: Outline, hole: Traj] RETURNS [holier: Outline]; ReplaceFence: PROC [outline: Outline, newFence: Traj] RETURNS [newOutline: Outline]; ReplaceHole: PROC [outline: Outline, oldHole, newHole: Traj] RETURNS [newOutline: Outline]; PartsFromSequence: PROC [outline: Outline, seq: Sequence] RETURNS [sliceParts: SliceParts]; CopyParts: PROC [outline: Outline, parts: SliceParts] RETURNS [copy: SliceParts]; FindTrajInDescriptor: PROC [outlineD: OutlineDescriptor, traj: Traj] RETURNS [seq: Sequence]; SaveSelectionsInOutline: PROC [outline: Outline, scene: Scene]; RemakeSelectionsFromOutline: PROC [outline: Outline, scene: Scene]; SaveSelectionInTraj: PROC [traj: Traj, selectClass: SelectionClass, scene: Scene]; RemakeSelectionFromTraj: PROC [traj: Traj, scene: Scene, selectClass: SelectionClass]; SequencesOfOutline: PROC [outlineD: OutlineDescriptor] RETURNS [seqList: LIST OF Sequence]; RemoveTraj: PROC [outlineD: OutlineDescriptor, traj: Traj]; UnpackOnePointDescriptorOld: PROC [outlineD: OutlineDescriptor] RETURNS [traj: Traj, isACP: BOOL, segNum, cpNum, jointNum: NAT]; UnpackOnePointDescriptor: PROC [sliceD: SliceDescriptor] RETURNS [traj: Traj, isACP: BOOL, segNum, cpNum, jointNum: NAT]; UnpackOneSegmentDescriptorOld: PROC [outlineD: OutlineDescriptor] RETURNS [traj: Traj, segNum: NAT]; UnpackOneSegmentDescriptor: PROC [sliceD: SliceDescriptor] RETURNS [traj: Traj, segNum: NAT]; UnpackSimpleDescriptorOld: PROC [outlineD: OutlineDescriptor] RETURNS [success: BOOL, partType: TrajPartType, traj: Traj, joint: Joint _ NIL, jointNum: NAT _ 999, cp: Point, cpNum: NAT _ 999, seg: Segment _ NIL, segNum: NAT _ 999]; UnpackSimpleDescriptor: PROC [sliceD: SliceDescriptor] RETURNS [success: BOOL, partType: TrajPartType, traj: Traj, joint: Joint _ NIL, jointNum: NAT _ 999, cp: Point, cpNum: NAT _ 999, seg: Segment _ NIL, segNum: NAT _ 999]; NearestJointToHitData: PROC [hitData: REF ANY] RETURNS [jointNum: NAT, traj: Traj]; UnpackHitData: PROC [hitData: REF ANY] RETURNS [traj: Traj, hitType: GGModelTypes.TrajPartType, segNum, cpNum, jointNum: INT, hitPoint: Point]; UpdateDescriptorBoundBoxes: PROC [outlineD: OutlineDescriptor]; UpdateOutlineBoundBox: PROC [slice: Outline]; OutlineOfTraj: PROC [traj: Traj] RETURNS [outline: Outline]; HasHoles: PROC [outline: Outline] RETURNS [BOOL]; FenceOfOutline: PROC [outline: Outline] RETURNS [fence: Traj]; HolesOfOutline: PROC [outline: Outline] RETURNS [trajGen: TrajGenerator]; TrajsInOutline: PROC [outline: Outline] RETURNS [trajGen: TrajGenerator]; AppendTrajList: PROC [list1, list2: LIST OF Traj] RETURNS [result: LIST OF Traj]; SetSegmentField: PROC [seg: Segment, selected: BOOL, selectClass: SelectionClass]; SetControlPointField: PROC [seg: Segment, cpNum: NAT, selected: BOOL, selectClass: SelectionClass]; SetJointField: PROC [joint: Joint, selected: BOOL, selectClass: SelectionClass]; GetSegmentField: PROC [seg: Segment, selectClass: SelectionClass] RETURNS [selected: BOOL]; GetControlPointField: PROC [seg: Segment, cpNum: NAT, selectClass: SelectionClass] RETURNS [selected: BOOL]; GetJointField: PROC [joint: Joint, selectClass: SelectionClass] RETURNS [selected: BOOL]; END. ήGGOutline.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Last edited by Bier on January 23, 1987 11:42:15 am PST Contents: Procedures to implement the Outline Slice Class in Gargoyle. Outlines consist of Trajectories which in turn consist of Segments. Outline is the most important slice class. Pier, July 3, 1986 1:05:02 pm PDT The Outline Slice Class CreateOutline creates a simple outline with a single trajectory. The lineEnds of an open outline, or the fill color of closed outline are stored in the outline record. Needed by GGSelectImpl.FindSelectedSequence. This will go away when the Caret machinery is revised. Update the bound boxes of all contained sequences. For use by GGTrajImpl only Used by GGSelect to do a DeselectTraj. Queries about Trajectories Up one level (traj -> outline). Finds the unique outline to which traj belongs. Queries about Outlines. Generates all of the holes of outline. Private procs shared by the Implementations Κ$˜codešœ™Kšœ Οmœ1™KšŸœžœžœ˜IšŸœžœžœ˜IKšœ&™&K™—K™K™+KšŸœžœžœžœžœ žœžœ˜QKšŸœžœžœ˜RKšŸœžœžœ žœ˜cKšŸ œžœžœ˜PKšŸœžœ-žœ žœ˜[Kš Ÿœžœžœžœ žœ˜lKšŸ œžœ-žœ žœ˜YK™Kšžœ˜—…—ΤΦ