<> <> <> <> <> <> <> DIRECTORY FeedbackTypes, GGBasicTypes, GGCoreTypes, GGHistoryTypes, GGSegmentTypes, Imager, ImagerFont, ImagerPath, ImagerTransformation, IO, Prop, Rope, Rosary; GGModelTypes: CEDAR DEFINITIONS = BEGIN BitMatrix: TYPE = GGBasicTypes.BitMatrix; BitVector: TYPE = GGBasicTypes.BitVector; BoundBox: TYPE = GGCoreTypes.BoundBox; Circle: TYPE = GGBasicTypes.Circle; MsgRouter: TYPE = FeedbackTypes.MsgRouter; HistoryEvent: TYPE = GGHistoryTypes.HistoryEvent; Joint: TYPE = GGSegmentTypes.Joint; Line: TYPE = GGCoreTypes.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 = GGCoreTypes.SequenceOfReal; StrokeEnd: TYPE = Imager.StrokeEnd; -- TYPE = {square, butt, round} StrokeJoint: TYPE = Imager.StrokeJoint; -- TYPE = {miter, bevel, round} Transformation: TYPE = ImagerTransformation.Transformation; Vector: TYPE = GGBasicTypes.Vector; MoveToProc: TYPE = ImagerPath.MoveToProc; LineToProc: TYPE = ImagerPath.LineToProc; CurveToProc: TYPE = ImagerPath.CurveToProc; ConicToProc: TYPE = ImagerPath.ConicToProc; ArcToProc: TYPE = ImagerPath.ArcToProc; <> EditConstraints: TYPE = {none, tangent, length}; -- For now to avoid Dependency BezierDragRecord: TYPE = RECORD [ -- For now while not a general constraint implementation draggingBezier: BOOL _ FALSE, trajEnd: TrajEnd _ lo, bezierNum: NAT _ 0, traj: Traj _ NIL, outlineSlice: Slice _ NIL ]; <> jointSize: REAL = 6; halfJointSize: REAL = 3; hotJointSize: REAL = 10; halfHotJointSize: REAL = 5; <> Camera: TYPE = REF CameraObj; CameraObj: TYPE = RECORD [ quality: QualityMode _ fast, displayStyle: DisplayStyle _ print, hideHot: BOOL _ FALSE, hideAlignments: BOOL _ FALSE, cpScale: REAL _ 1.0 -- scale control points about their centers by this factor before drawing ]; DisplayStyle: TYPE = {print, screen}; <> <> QualityMode: TYPE = {fast, showall, quality}; <> <> <> <> FontData: TYPE = REF FontDataRec; FontDataRec: TYPE = RECORD [ literal: Rope.ROPE, -- "xerox/xc1-2-2/Modern-bold-italic" prefix: Rope.ROPE,-- "xerox/xc1-2-2/" literalFSF: Rope.ROPE, -- literal familySizeFace: "Modern-bold-italic" userFSF: Rope.ROPE, -- user familySizeFace: "Modern-BI" family: Rope.ROPE, -- family: "Modern" transform: ImagerTransformation.Transformation, scale: REAL _ 1.0, storedSize: REAL _ 1.0, designSize: REAL _ 1.0, comfortable: BOOL _ FALSE, bold, italic, faceKnown: BOOL _ FALSE, substituteOK: BOOL _ FALSE, substituted: BOOL _ FALSE, namelessFont: ImagerFont.Font _ NIL ]; 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: FontData, textColor: Imager.Color _ NIL, dropShadowOn: BOOL _ FALSE, dropShadowOffset: Vector _ [-0.1, -0.1], dropShadowColor: Imager.Color _ NIL ]; <<>> <> 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 matchSelectedParts: SliceDescriptor, -- maintained by GGSelect to improve performance nullDescriptor: SliceDescriptor, -- to reduce allocations when there is nothing to report fullDescriptor: SliceDescriptor, -- to reduce allocations when everything is selected tightBox: BoundBox _ NIL, tightBoxValid: BOOL _ FALSE, -- added Bier, March 12, 1988 boundBox: BoundBox _ NIL, boxValid: BOOL _ FALSE, onOverlay: BOOL _ FALSE, extraPoints: LIST OF Joint, priority: INT _ 0, -- scene order priority. 0 => in back historyTop: INT _ 0, -- index of latest history event touching this slice cacheHint: CARD32 _ LAST[CARD32],-- where to look in the image cache for this slice's class to find a previously rendered version of this shape props: Prop.PropList ]; SliceClass: TYPE = REF SliceClassObj; SliceClassObj: TYPE = RECORD [ type: ATOM, <> getBoundBox: SliceBoundBoxProc, -- includes space for stroke width and control points getTransformedBoundBox: SliceTransformedBoundBoxProc, -- includes space for stroke width and control points getTightBox: SliceTightBoxProc, -- fits tightly around the graphical part of the slice copy: SliceCopyProc, unlink: SliceUnlinkProc, restore: SliceRestoreProc, <> buildPath: SliceBuildPathProc, drawBorder: SliceDrawBorderProc, drawParts: SliceDrawPartsProc, drawTransform: SliceDrawTransformProc, drawSelectionFeedback: SliceDrawSelectionFeedbackProc, drawAttractorFeedback: SliceDrawAttractorFeedbackProc, attractorFeedbackBoundBox: SliceAttractorFeedbackBoundBoxProc _ NIL, saveSelections: SliceSaveSelectionsProc, remakeSelections: SliceRemakeSelectionsProc, <> transform: SliceTransformProc, <> describe: SliceDescribeProc, describeHit: SliceDescribeHitProc, fileout: SliceFileoutProc, filein: SliceFileinProc, <> isEmptyParts: SliceIsEmptyPartsProc, isCompleteParts: SliceIsCompletePartsProc, newParts: SliceNewPartsProc, unionParts: SliceUnionPartsProc, differenceParts: SliceDifferencePartsProc, movingParts: SliceMovingPartsProc, augmentParts: SliceAugmentPartsProc, alterParts: SliceAlterPartsProc, setSelectedFields: SliceSetSelectedFieldsProc, <> pointsInDescriptor: SlicePointsInDescriptorProc, walkPointsInDescriptor: SliceWalkPointsInDescriptorProc, pointPairsInDescriptor: SlicePointPairsInDescriptorProc, segmentsInDescriptor: SliceSegmentsInDescriptorProc, walkSegments: SliceWalkSegmentsProc, nextPoint: SliceNextPointProc, nextPointPair: SliceNextPointPairProc, nextSegment: SliceNextSegmentProc, <> closestPoint: SliceClosestPointProc, closestJointToHitData: SliceClosestJointToHitDataProc, closestPointAndTangent: SliceClosestPointAndTangentProc, closestSegment: SliceClosestSegmentProc, filledPathsUnderPoint: SliceFilledPathsUnderPointProc, lineIntersection: SliceLineIntersectionProc, circleIntersection: SliceCircleIntersectionProc, hitDataAsSimpleCurve: SliceHitDataAsSimpleCurveProc, <