DIRECTORY FeedbackTypes, GGBasicTypes, GGFont, GGHistoryTypes, GGModelTypes, GGSegmentTypes, Imager, ImagerTransformation, InterpressInterpreter, Rope, TextNode, TiogaImager; GGSlice: CEDAR DEFINITIONS IMPORTS Imager = BEGIN OPEN GGModelTypes; BoundBox: TYPE = GGModelTypes.BoundBox; Color: TYPE = Imager.Color; Camera: TYPE = GGModelTypes.Camera; DisplayStyle: TYPE = GGModelTypes.DisplayStyle; MsgRouter: TYPE = FeedbackTypes.MsgRouter; FontData: TYPE = GGFont.FontData; HistoryEvent: TYPE = GGHistoryTypes.HistoryEvent; Point: TYPE = GGBasicTypes.Point; PointGenerator: TYPE = GGModelTypes.PointGenerator; PointPairGenerator: TYPE = GGModelTypes.PointPairGenerator; Segment: TYPE = GGSegmentTypes.Segment; SegmentGenerator: TYPE = GGModelTypes.SegmentGenerator; SelectionClass: TYPE = GGSegmentTypes.SelectionClass; Slice: TYPE = GGModelTypes.Slice; SliceClass: TYPE = GGModelTypes.SliceClass; SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor; SliceGenerator: TYPE = GGModelTypes.SliceGenerator; SliceParts: TYPE = GGModelTypes.SliceParts; StrokeEnd: TYPE = Imager.StrokeEnd; Vector: TYPE = GGBasicTypes.Vector; WalkProc: TYPE = GGModelTypes.WalkProc; NotFound: SIGNAL; FontNameError: SIGNAL; RegisterSliceClass: PROC [class: SliceClass]; FetchSliceClass: PROC [name: ATOM] RETURNS [class: SliceClass]; DescriptorFromParts: PROC [slice: Slice, parts: SliceParts] RETURNS [sliceD: SliceDescriptor]; EntitiesInSlice: PROC [slice: Slice] RETURNS [entityGenerator: SliceGenerator]; ClusterData: TYPE = REF ClusterDataObj; ClusterDataObj: TYPE = RECORD [ frozen: BOOL ¬ TRUE ]; CreateCluster: PROC [frozen: BOOL ¬ TRUE] RETURNS [parent: Slice]; AddChildToCluster: PROC [parent: Slice, child: Slice, priority: INT]; AddChildrenToCluster: PROC [parent: Slice, children: LIST OF Slice, priority: INT]; RemoveChild: PROC [parent: Slice, child: Slice] RETURNS [newParent: Slice]; PruneNullClusters: PROC [scene: Scene, cluster: Slice]; SetFrozen: PROC [cluster: Slice, frozen: BOOL]; GetFrozen: PROC [cluster: Slice] RETURNS [frozen: BOOL]; BuildClusterSliceClass: PROC [] RETURNS [class: SliceClass]; BuildMoreClusterSliceClass: PROC [class: SliceClass]; -- for internal communication only BuildTextSliceClass: PROC [] RETURNS [class: SliceClass]; MakeTextSlice: PROC [text: Rope.ROPE, color: Imager.Color, displayStyle: DisplayStyle, amplifySpace: REAL ¬ 1.0, dropShadowsOn: BOOL ¬ FALSE, dropShadowOffset: Vector ¬ [0.0, 0.0], shadowColor: Imager.Color ¬ Imager.black] RETURNS [slice: Slice]; SetTextFont: PROC [slice: Slice, fontData: FontData, router: MsgRouter, history: HistoryEvent] RETURNS [ success: BOOL ¬ TRUE]; SetTextFontAndTransform: PROC [slice: Slice, fontData: FontData, router: MsgRouter, history: HistoryEvent] RETURNS [ success: BOOL ¬ TRUE]; GetFontData: PROC [slice: Slice] RETURNS [fontData: FontData]; GetFontDataRope: PROC [slice: Slice] RETURNS [Rope.ROPE]; GetFontLiteralDataRope: PROC [slice: Slice] RETURNS [Rope.ROPE]; GetLooksDataRope: PROC [slice: Slice] RETURNS [Rope.ROPE]; IsWhitespace: PROC [slice: Slice] RETURNS [BOOL]; GetText: PROC [slice: Slice] RETURNS [text: Rope.ROPE]; SetText: PROC [slice: Slice, text: Rope.ROPE]; AppendText: PROC [slice: Slice, text: Rope.ROPE]; BackspaceText: PROC [slice: Slice, word: BOOL ¬ FALSE]; SetTextAmplifySpace: PROC [slice: Slice, amplifySpace: REAL, router: MsgRouter, history: HistoryEvent]; GetTextAmplifySpace: PROC [slice: Slice] RETURNS [amplifySpace: REAL]; SetTextColors: PROC [slice: Slice, textColor: Imager.Color, useTextColor: BOOL ¬ TRUE, shadowColor: Imager.Color, useShadowColor: BOOL ¬ FALSE, history: HistoryEvent]; GetTextColors: PROC [slice: Slice] RETURNS [textColor, shadowColor: Imager.Color]; GetTextDropShadow: PROC [slice: Slice] RETURNS [dropShadowOn: BOOL, dropShadow: Vector, color: Imager.Color]; DropShadowOn: PROC [slice: Slice, offset: Vector, history: HistoryEvent]; DropShadowOff: PROC [slice: Slice, history: HistoryEvent]; GetTextLineSpacing: PROC [slice: Slice] RETURNS [REAL]; SetTextLineSpacing: PROC [slice: Slice, lineSpacing: REAL, history: HistoryEvent]; SetTextDisplayStyle: PROC [slice: Slice, displayStyle: DisplayStyle, history: HistoryEvent]; OutlinesFromTextString: PROC [slice: Slice] RETURNS [shadowOutlines, outlines: LIST OF Slice]; Corner: TYPE = {none, ll, ul, ur, lr}; -- lower left, upper left, upper right, lower right Edge: TYPE = {none, left, right, top, bottom}; BuildBoxSliceClass: PROC [] RETURNS [class: SliceClass]; MakeBoxFromMaskPixel: PROC [pa: Imager.PixelArray, color: Color, router: MsgRouter, transform: ImagerTransformation.Transformation ¬ NIL] RETURNS [slice: Slice]; MakeBoxSlice: PROC [box: BoundBox, corner: Corner, transform: ImagerTransformation.Transformation] RETURNS [sliceD: SliceDescriptor]; BoxFetchSegment: PROC [slice: Slice, index: NAT] RETURNS [seg: Segment]; SetBoxText: PROC [slice: Slice, loc: TextNode.Location, screenStyle: BOOL ¬ FALSE, history: HistoryEvent]; GetBoxText: PROC [slice: Slice] RETURNS [loc: TextNode.Location, screenStyle: BOOL]; GetBoxNodes: PROC [slice: Slice] RETURNS [nodes: TiogaImager.FormattedNodes]; RenderText: PROC [dc: Imager.Context, slice: GGModelTypes.Slice, camera: Camera, quick: BOOL]; BuildCircleSliceClass: PROC [] RETURNS [class: SliceClass]; MakeCircleSlice: PROC [origin: Point, outerPoint: Point] RETURNS [sliceD: SliceDescriptor]; CircleGetParams: PROC [slice: Slice] RETURNS [origin: Point, outerPoint: Point, transform: ImagerTransformation.Transformation]; -- used by MatchTool BuildIPSliceClass: PROC [] RETURNS [class: SliceClass]; MakeIPSliceFromMaster: PROC [ipMaster: InterpressInterpreter.Master, pixelsPerUnit: REAL ¬ 2834.646, fullName: Rope.ROPE ¬ NIL, router: MsgRouter, transform: ImagerTransformation.Transformation ¬ NIL, localTightBox: BoundBox ¬ NIL, localBox: BoundBox ¬ NIL, includeByValue: BOOL] RETURNS [slice: Slice]; MakeIPSliceFromMaskPixel: PROC [pa: Imager.PixelArray, color: Color, router: MsgRouter, transform: ImagerTransformation.Transformation ¬ NIL] RETURNS [slice: Slice]; MakeIPSliceFromMaskBits: PROC [base: LONG POINTER, wordsPerLine: NAT, sMin, fMin, sSize, fSize: NAT, tx, ty: INTEGER ¬ 0, color: Color, router: MsgRouter, transform: ImagerTransformation.Transformation ¬ NIL] RETURNS [slice: Slice]; SetIncludeByValue: PROC [slice: Slice, includeByValue: BOOL, history: HistoryEvent]; GetIncludeByValue: PROC [slice: Slice] RETURNS [includeByValue: BOOL]; SetDefaultUseLatestIPVersion: PROC [useLatestIPVersion: BOOL]; GetDefaultUseLatestIPVersion: PROC [] RETURNS [useLatestIPVersion: BOOL]; BuildTrajSliceClass: PROC [] RETURNS [class: SliceClass]; BuildMoreTrajSliceClass: PROC [class: SliceClass]; -- for internal communication only BuildOutlineSliceClass: PROC [] RETURNS [class: SliceClass]; BuildMoreOutlineSliceClass: PROC [class: SliceClass]; -- for internal communication only TrajShapeChangeNotify: PROC [slice: Slice]; -- calls KillBoundBox and invalidates the polyline approximation copyRestore: BOOL; -- temporary for test Restore procs. in GGSliceImplA.copyRestore KillBoundBox: PROC [slice: Slice]; -- invalidate cached bound box and tight box in ancestor caches KillBoundBoxOnly: PROC [slice: Slice]; -- invalidate cached bound box in ancestor caches KillTightBoxOnly: PROC [slice: Slice]; -- invalidate cached tight box in ancestor caches UnlinkSlice: PROC [slice: Slice]; NoOpBoundBox: SliceBoundBoxProc; NoOpTransformedBoundBox: SliceTransformedBoundBoxProc; NoOpTightBox: SliceTightBoxProc; NoOpCopy: SliceCopyProc; NoOpBuildPath: SliceBuildPathProc; NoOpDrawBorder: SliceDrawBorderProc; NoOpDrawParts: SliceDrawPartsProc; NoOpDrawTransform: SliceDrawTransformProc; NoOpDrawSelectionFeedback: SliceDrawSelectionFeedbackProc; NoOpDrawAttractorFeedback: SliceDrawAttractorFeedbackProc; NoOpAttractorFeedbackBoundBox: SliceAttractorFeedbackBoundBoxProc; NoOpSaveSelections: SliceSaveSelectionsProc; NoOpRemakeSelections: SliceRemakeSelectionsProc; NoOpTransform: SliceTransformProc; NoOpDescribe: SliceDescribeProc; NoOpDescribeHit: SliceDescribeHitProc; NoOpFileout: SliceFileoutProc; NoOpFilein: SliceFileinProc; NoOpEmptyParts: SliceIsEmptyPartsProc; NoOpIsCompleteParts: SliceIsCompletePartsProc; NoOpNewParts: SliceNewPartsProc; NoOpUnionParts: SliceUnionPartsProc; NoOpDifferenceParts: SliceDifferencePartsProc; NoOpMovingParts: SliceMovingPartsProc; NoOpAugmentParts: SliceAugmentPartsProc; NoOpAlterParts: SliceAlterPartsProc; NoOpSetSelectedFields: SliceSetSelectedFieldsProc; NoOpPointsInDescriptor: SlicePointsInDescriptorProc; NoOpPointPairsInDescriptor: SlicePointPairsInDescriptorProc; NoOpSegmentsInDescriptor: SliceSegmentsInDescriptorProc; NoOpWalkSegments: SliceWalkSegmentsProc; NoOpNextPoint: SliceNextPointProc; NoOpNextPointPair: SliceNextPointPairProc; NoOpNextSegment: SliceNextSegmentProc; NoOpClosestPoint: SliceClosestPointProc; NoOpClosestJointToHitData: SliceClosestJointToHitDataProc; NoOpClosestPointAndTangent: SliceClosestPointAndTangentProc; NoOpClosestSegment: SliceClosestSegmentProc; NoOpFilledPathsUnderPoint: SliceFilledPathsUnderPointProc; NoOpLineIntersection: SliceLineIntersectionProc; NoOpCircleIntersection: SliceCircleIntersectionProc; NoOpHitDataAsSimpleCurve: SliceHitDataAsSimpleCurveProc; NoOpSetDefaults: SliceSetDefaultsProc; NoOpSetStrokeWidth: SliceSetStrokeWidthProc; NoOpGetStrokeWidth: SliceGetStrokeWidthProc; NoOpSetStrokeEnd: SliceSetStrokeEndProc; NoOpGetStrokeEnd: SliceGetStrokeEndProc; NoOpSetStrokeJoint: SliceSetStrokeJointProc; NoOpGetStrokeJoint: SliceGetStrokeJointProc; NoOpSetStrokeColor: SliceSetStrokeColorProc; NoOpGetStrokeColor: SliceGetStrokeColorProc; NoOpSetFillColor: SliceSetFillColorProc; NoOpGetFillColor: SliceGetFillColorProc; NoOpSetArrows: SliceSetArrowsProc; NoOpGetArrows: SliceGetArrowsProc; NoOpSetDashed: SliceSetDashedProc; NoOpGetDashed: SliceGetDashedProc; NoOpSetOrientation: SliceSetOrientationProc; NoOpGetOrientation: SliceGetOrientationProc; GenericTransformedBoundBox: SliceTransformedBoundBoxProc; END. F GGSlice.mesa Copyright Σ 1987, 1991, 1992 by Xerox Corporation. All rights reserved. Contents: Public access to instances of each slice class. Pier, August 15, 1991 9:36 pm PDT Bier, December 2, 1991 11:07 am PST Kurlander, August 6, 1987 11:17:31 am PDT Eisenman, September 28, 1987 5:57:33 pm PDT Doug Wyatt, April 10, 1992 12:08 pm PDT Creation and Queries about Slice Classes Creation, Modification and Queries about Slices Clusters Disconnects the named child from parent (to which it presumably belongs). Does not affect selections. Text Slices MakeTextSlice MUST BE FOLLOWED BY A CALL TO SetTextFont !! The text slice's font will be set using fontData. The translation component of the existing slice transform will be used. If fontData.transform=NIL, the scale component of the new transform is set to fontData.scale and the rotation component to 0. The text slice's font will be set using fontData. fontData.transform will be used. A fontName is a font designation with family, size, and face, like Helvetica23BI or TimesRoman6. A colorName is a name from the color naming system in the Cedar ColorTool. may raise FontStringError Box Slices A box is a slice which maintains its rectilinear properties. It is possible to select/drag one of four corners, one of four edges, or the entire box. When a corner is dragged, box is rubberbanded to keep its box shape. When an edge is dragged, only the perpendicular component of the drag vector is used to move the edge, thus maintaining box shape. When the entire box is selected (traj or topLevel), it can be translated and rotated. transform defaults to the identity. used by parent to render text after rendering fill and outline Circle Slices Interpress Slices pixelsPerUnit explains what the unit was when the interpress master was made. The default value is for meters. A duplicate of GGUserProfile.SetDefaultUseLatestIPVersion, for the modelling level. A duplicate of GGUserProfile.GetDefaultUseLatestIPVersion, for the modelling level. Outline and Trajectory Slices Slice Utility Routines For use ONLY to destroy REFs in slices so that Cedar garbage collector can collect storage. Only for wizards. NoOp Class Routines In GGSliceImplC.NoOpBoundBox Drawing Transforming Textual Description Hit Testing Style this proc is an expensive way to calculate the bound box of a transformed object Κ `–(cedarcode) style•NewlineDelimiter ™codešœ ™ Kšœ Οeœ=™HK™9Kšœ!™!Kšœ#™#K™)K™+K™'K™—šΟk ˜ K˜€—K˜Kš Οnœžœž œžœ ž˜1˜KšΠbkΟb˜K˜Kšœ žœ˜'Kšœžœ˜Kšœžœ˜#Kšœžœ˜/Kšœ žœ˜*Kšœ žœ˜!Kšœžœ˜1Kšœžœ˜!Kšœžœ˜3Kšœžœ#˜;Kšœ žœ˜'Kšœžœ!˜7Kšœžœ!˜5Kšœžœ˜!Kšœ žœ˜+Kšœžœ ˜5Kšœžœ˜3Kšœ žœ˜+Kšœ žœ˜#Kšœžœ˜#Kšœ žœ˜'—K˜KšŸœžœ˜KšŸ œžœ˜K˜Kšœ(™(K˜KšŸœžœ˜-KšŸœžœžœžœ˜?K˜šœ/™/K˜—KšŸœžœ#žœ˜^KšŸœžœžœ#˜OK˜K™Iprocšœ žœžœ˜'šœžœžœ˜Lšœžœž˜L˜L˜—Kš Ÿ œžœ žœžœžœ˜BKšŸœžœ)žœ˜EKš Ÿœžœžœžœžœ˜SKšŸ œžœžœ˜KKšŸœžœ ˜7KšŸ œžœžœ˜/šŸ œžœžœ žœ˜8K™f—K˜KšŸœžœžœ˜KšŸœžœžœžœ˜9KšŸœžœžœžœ˜@KšŸœžœžœžœ˜:KšŸ œžœžœžœ˜1KšŸœžœžœ žœ˜7KšŸœžœžœ˜.KšŸ œžœžœ˜1KšŸ œžœžœžœ˜7KšŸœžœžœ,˜gKšŸœžœžœžœ˜FKš Ÿ œžœ7žœžœ-žœžœ˜§KšŸ œžœžœ(˜RKšŸœžœžœžœ+˜mKšŸ œžœ7˜IšŸ œžœ'˜:Kšœ«™«K™—KšŸœžœžœžœ˜7KšŸœžœžœ˜RKšŸœžœC˜\Kš Ÿœžœžœžœžœ˜^K˜™ K™—Kšœ΄™΄K™Kšœžœ’3˜ZKšœžœ$˜.K˜šŸœžœžœ˜8Kšœ#™#—KšŸœžœkžœžœ˜‘KšŸ œžœQžœ˜…KšŸœžœžœžœ˜HKšŸ œžœ5žœžœ˜jKšŸ œžœžœ'žœ˜TKšŸ œžœžœ%˜MšŸ œžœHžœ˜^K™>—K™™ K˜—KšŸœžœžœ˜;KšŸœžœ$žœ˜[KšŸœžœžœU’˜•K˜™K™—KšŸœžœžœ˜7šŸœžœ9žœžœžœFžœžœžœžœžœ˜―Kšœo™o—KšŸœžœkžœžœ˜₯KšŸœžœžœžœžœžœ žœXžœžœ˜ιKšŸœžœ žœ˜TšŸœžœžœžœ˜FK˜—šŸœžœžœ˜>KšœS™S—šŸœžœžœžœ˜IKšœS™S—K˜™K™—KšŸœžœžœ˜9KšŸœžœ’"˜UKšŸœžœžœ˜