<> <> <> <> <> DIRECTORY AtomButtonsTypes, GGBasicTypes, GGSegmentTypes, GGFont, Imager, ImagerPath, ImagerTransformation, IO, Rope, Rosary, ViewerClasses; GGModelTypes: CEDAR DEFINITIONS = BEGIN <> BitMatrix: TYPE = GGBasicTypes.BitMatrix; BitVector: TYPE = GGBasicTypes.BitVector; BoundBox: TYPE = GGBasicTypes.BoundBox; Circle: TYPE = GGBasicTypes.Circle; FeedbackData: TYPE = AtomButtonsTypes.FeedbackData; Joint: TYPE = GGSegmentTypes.Joint; Line: TYPE = GGBasicTypes.Line; Point: TYPE = GGBasicTypes.Point; Scene: TYPE = REF SceneObj; SceneObj: TYPE; -- Opaque Type, Implemented by GGSceneImpl Segment: TYPE = GGSegmentTypes.Segment; SelectedObjectData: TYPE = GGSegmentTypes.SelectedObjectData; SelectionClass: TYPE = GGSegmentTypes.SelectionClass; SequenceOfReal: TYPE = GGBasicTypes.SequenceOfReal; StrokeEnd: TYPE = Imager.StrokeEnd; -- TYPE = {square, butt, round} StrokeJoint: TYPE = Imager.StrokeJoint; -- TYPE = {miter, bevel, round} Vector: TYPE = GGBasicTypes.Vector; Viewer: TYPE = ViewerClasses.Viewer; Transformation: TYPE = ImagerTransformation.Transformation; <> jointSize: REAL = 6; halfJointSize: REAL = 3; hotJointSize: REAL = 10; halfHotJointSize: REAL = 5; <> CameraData: TYPE = REF CameraDataObj; CameraDataObj: TYPE = RECORD [ quality: QualityMode _ fast, displayStyle: DisplayStyle _ print, hideHot: BOOL _ FALSE, hideAlignments: BOOL _ FALSE ]; DisplayStyle: TYPE = {print, screen}; <> <> QualityMode: TYPE = {fast, showall, quality}; <> <> <> DefaultData: TYPE = REF DefaultDataObj; DefaultDataObj: TYPE = RECORD [ strokeWidth: REAL _ 2.0, strokeJoint: StrokeJoint _ round, strokeEnd: StrokeEnd _ round, dashed: BOOL _ FALSE, pattern: SequenceOfReal, offset: REAL _ 0.0, length: REAL _ 0.0, strokeColor: Imager.Color,-- no color fillColor: Imager.Color _ NIL, -- no fill font: GGFont.FontData ]; <<>> <> SliceParts: TYPE = REF ANY; SliceDescriptor: TYPE = REF SliceDescriptorObj; SliceDescriptorObj: TYPE = RECORD [ slice: Slice, parts: SliceParts ]; Slice: TYPE = REF SliceObj; SliceObj: TYPE = RECORD [ class: SliceClass, data: REF ANY, parent: Slice, -- for when slices can be part of clusters selectedInFull: SelectedObjectData, normalSelectedParts: SliceDescriptor, -- maintained by GGSelect to improve performance hotSelectedParts: SliceDescriptor, -- maintained by GGSelect to improve performance activeSelectedParts: SliceDescriptor, -- maintained by GGSelect to improve performance nullDescriptor: SliceDescriptor, -- to reduce allocations when there is nothing to report boundBox: BoundBox _ NIL, onOverlay: BOOL _ FALSE, extraPoints: LIST OF Joint, priority: INT _ 0, -- scene order priority. 0 => in back mark: BOOL _ FALSE -- for sweeping thru scenes by Undelete mechanism ]; SliceClass: TYPE = REF SliceClassObj; SliceClassObj: TYPE = RECORD [ type: ATOM, <> getBoundBox: SliceBoundBoxProc, -- includes space for stroke width and control points getTightBox: SliceTightBoxProc, -- fits tightly around the graphical part of the slice copy: SliceCopyProc, <> drawParts: SliceDrawPartsProc, drawTransform: SliceDrawTransformProc, drawSelectionFeedback: SliceDrawSelectionFeedbackProc, drawAttractorFeedback: SliceDrawAttractorFeedbackProc, <> transform: SliceTransformProc, <> describe: SliceDescribeProc, describeHit: SliceDescribeHitProc, fileout: SliceFileoutProc, filein: SliceFileinProc, <> isEmptyParts: SliceIsEmptyPartsProc, isCompleteParts: SliceIsCompletePartsProc, newParts: SliceNewPartsProc, unionParts: SliceUnionPartsProc, differenceParts: SliceDifferencePartsProc, movingParts: SliceMovingPartsProc, augmentParts: SliceAugmentPartsProc, setSelectedFields: SliceSetSelectedFieldsProc, <> pointsInDescriptor: SlicePointsInDescriptorProc, pointPairsInDescriptor: SlicePointPairsInDescriptorProc, segmentsInDescriptor: SliceSegmentsInDescriptorProc, walkSegments: SliceWalkSegmentsProc, nextPoint: SliceNextPointProc, nextPointPair: SliceNextPointPairProc, nextSegment: SliceNextSegmentProc, <> closestPoint: SliceClosestPointProc, closestJointToHitData: SliceClosestJointToHitDataProc, closestPointAndTangent: SliceClosestPointAndTangentProc, closestSegment: SliceClosestSegmentProc, lineIntersection: SliceLineIntersectionProc, circleIntersection: SliceCircleIntersectionProc, hitDataAsSimpleCurve: SliceHitDataAsSimpleCurveProc, <