DIRECTORY GGBasicTypes, GGFont, GGInterfaceTypes, GGModelTypes, Imager, ImagerFont, ImagerTransformation, Interpress, NodeStyle, Rope, ViewerClasses; GGSlice: CEDAR DEFINITIONS IMPORTS Imager = BEGIN FontData: TYPE = GGFont.FontData; EntityGenerator: TYPE = GGModelTypes.EntityGenerator; BoundBox: TYPE = GGModelTypes.BoundBox; Color: TYPE = Imager.Color; DisplayStyle: TYPE = GGInterfaceTypes.DisplayStyle; Point: TYPE = GGBasicTypes.Point; PointGenerator: TYPE = GGModelTypes.PointGenerator; PointPairGenerator: TYPE = GGModelTypes.PointPairGenerator; Scene: TYPE = GGModelTypes.Scene; Slice: TYPE = GGModelTypes.Slice; SliceClass: TYPE = GGModelTypes.SliceClass; SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor; Vector: TYPE = GGBasicTypes.Vector; Viewer: TYPE = ViewerClasses.Viewer; SliceBoundBoxProc: TYPE = GGModelTypes.SliceBoundBoxProc; SliceCopyProc: TYPE = GGModelTypes.SliceCopyProc; SliceDrawPartsProc: TYPE = GGModelTypes.SliceDrawPartsProc; SliceDrawTransformProc: TYPE = GGModelTypes.SliceDrawTransformProc; SliceDrawSelectionFeedbackProc: TYPE = GGModelTypes.SliceDrawSelectionFeedbackProc; SliceDrawAttractorFeedbackProc: TYPE = GGModelTypes.SliceDrawAttractorFeedbackProc; SliceTransformProc: TYPE = GGModelTypes.SliceTransformProc; SliceDescribeProc: TYPE = GGModelTypes.SliceDescribeProc; SliceFileoutProc: TYPE = GGModelTypes.SliceFileoutProc; SliceFileinProc: TYPE = GGModelTypes.SliceFileinProc; SliceEmptyPartsProc: TYPE = GGModelTypes.SliceEmptyPartsProc; SliceNewPartsProc: TYPE = GGModelTypes.SliceNewPartsProc; SliceUnionPartsProc: TYPE = GGModelTypes.SliceUnionPartsProc; SliceDifferencePartsProc: TYPE = GGModelTypes.SliceDifferencePartsProc; SliceMovingPartsProc: TYPE = GGModelTypes.SliceMovingPartsProc; SliceFixedPartsProc: TYPE = GGModelTypes.SliceFixedPartsProc; SliceAugmentPartsProc: TYPE = GGModelTypes.SliceAugmentPartsProc; SlicePointsInDescriptorProc: TYPE = GGModelTypes.SlicePointsInDescriptorProc; SlicePointPairsInDescriptorProc: TYPE = GGModelTypes.SlicePointPairsInDescriptorProc; SliceNextPointProc: TYPE = GGModelTypes.SliceNextPointProc; SliceNextPointPairProc: TYPE = GGModelTypes.SliceNextPointPairProc; SliceClosestPointProc: TYPE = GGModelTypes.SliceClosestPointProc; SliceClosestPointAndTangentProc: TYPE = GGModelTypes.SliceClosestPointAndTangentProc; SliceClosestSegmentProc: TYPE = GGModelTypes.SliceClosestSegmentProc; SliceLineIntersectionProc: TYPE = GGModelTypes.SliceLineIntersectionProc; SliceCircleIntersectionProc: TYPE = GGModelTypes.SliceCircleIntersectionProc; SliceHitDataAsSimpleCurveProc: TYPE = GGModelTypes.SliceHitDataAsSimpleCurveProc; SliceSetStrokeWidthProc: TYPE = GGModelTypes.SliceSetStrokeWidthProc; SliceGetStrokeWidthProc: TYPE = GGModelTypes.SliceGetStrokeWidthProc; SliceSetStrokeColorProc: TYPE = GGModelTypes.SliceSetStrokeColorProc; SliceGetStrokeColorProc: TYPE = GGModelTypes.SliceGetStrokeColorProc; SliceSetFillColorProc: TYPE = GGModelTypes.SliceSetFillColorProc; SliceGetFillColorProc: TYPE = GGModelTypes.SliceGetFillColorProc; SliceSetArrowsProc: TYPE = GGModelTypes.SliceSetArrowsProc; SliceGetArrowsProc: TYPE = GGModelTypes.SliceGetArrowsProc; NotFound: SIGNAL; FontNameError: SIGNAL; RegisterSliceClass: PROC [class: SliceClass]; FetchSliceClass: PROC [name: ATOM] RETURNS [class: SliceClass]; CopySlice: PROC [slice: Slice] RETURNS [copy: Slice]; DeleteSlice: PROC [scene: Scene, slice: Slice]; EntitiesInSlice: PROC [slice: Slice] RETURNS [entityGenerator: EntityGenerator]; BuildTextSliceClass: PROC [] RETURNS [class: SliceClass]; MakeTextSlice: PROC [text: Rope.ROPE, color: Imager.Color _ Imager.black, 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, feedback: ViewerClasses.Viewer] RETURNS [ success: BOOL _ TRUE]; SetTextFontAndTransform: PROC [slice: Slice, fontData: FontData, feedback: ViewerClasses.Viewer] 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]; GetText: PROC [slice: Slice] RETURNS [text: Rope.ROPE]; AppendText: PROC [slice: Slice, text: Rope.ROPE]; BackspaceText: PROC [slice: Slice]; SetTextAmplifySpace: PROC [slice: Slice, amplifySpace: REAL, feedback: ViewerClasses.Viewer]; GetTextAmplifySpace: PROC [slice: Slice] RETURNS [amplifySpace: REAL]; SetTextColor: PROC [slice: Slice, color: Imager.Color, colorName: Rope.ROPE]; GetTextColor: PROC [slice: Slice] RETURNS [color: Imager.Color, colorName: Rope.ROPE]; DropShadowOn: PROC [slice: Slice, offset: Vector]; DropShadowOff: PROC [slice: 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]; MakeBoxSlice: PROC [box: BoundBox, corner: Corner, transform: ImagerTransformation.Transformation, strokeWidth: REAL _ 2.0] RETURNS [sliceD: SliceDescriptor]; BuildCircleSliceClass: PROC [] RETURNS [class: SliceClass]; MakeCircleSlice: PROC [origin: Point, outerPoint: Point, strokeWidth: REAL _ 2.0, strokeColor: Imager.Color _ Imager.black, fillColor: Imager.Color _ NIL] RETURNS [sliceD: SliceDescriptor]; BuildIPSliceClass: PROC [] RETURNS [class: SliceClass]; MakeIPSliceFromMaster: PROC [ipMaster: Interpress.Master, pixelsPerUnit: REAL _ 2834.646, fullName: Rope.ROPE _ NIL, feedback: Viewer, transform: ImagerTransformation.Transformation _ NIL, localBox: BoundBox _ NIL, includeByValue: BOOL] RETURNS [slice: Slice]; MakeIPSliceFromMaskPixel: PROC [pa: Imager.PixelArray, color: Color, feedback: Viewer, 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, feedback: Viewer, transform: ImagerTransformation.Transformation _ NIL] RETURNS [slice: Slice]; SetIncludeByValue: PROC [slice: Slice, includeByValue: BOOL]; GetIncludeByValue: PROC [slice: Slice] RETURNS [includeByValue: BOOL]; NoOpBoundBox: SliceBoundBoxProc; NoOpCopy: SliceCopyProc; NoOpDrawParts: SliceDrawPartsProc; NoOpDrawTransform: SliceDrawTransformProc; NoOpDrawSelectionFeedback: SliceDrawSelectionFeedbackProc; NoOpDrawAttractorFeedback: SliceDrawAttractorFeedbackProc; NoOpTransform: SliceTransformProc; NoOpDescribe: SliceDescribeProc; NoOpFileout: SliceFileoutProc; NoOpFilein: SliceFileinProc; NoOpEmptyParts: SliceEmptyPartsProc; NoOpNewParts: SliceNewPartsProc; NoOpUnionParts: SliceUnionPartsProc; NoOpDifferenceParts: SliceDifferencePartsProc; NoOpMovingParts: SliceMovingPartsProc; NoOpFixedParts: SliceFixedPartsProc; NoOpAugmentParts: SliceAugmentPartsProc; NoOpPointsInDescriptor: SlicePointsInDescriptorProc; NoOpPointPairsInDescriptor: SlicePointPairsInDescriptorProc; NoOpNextPoint: SliceNextPointProc; NoOpNextPointPair: SliceNextPointPairProc; NoOpClosestPoint: SliceClosestPointProc; NoOpClosestPointAndTangent: SliceClosestPointAndTangentProc; NoOpClosestSegment: SliceClosestSegmentProc; NoOpLineIntersection: SliceLineIntersectionProc; NoOpCircleIntersection: SliceCircleIntersectionProc; NoOpHitDataAsSimpleCurve: SliceHitDataAsSimpleCurveProc; NoOpSetStrokeWidth: SliceSetStrokeWidthProc; NoOpGetStrokeWidth: SliceGetStrokeWidthProc; NoOpSetStrokeColor: SliceSetStrokeColorProc; NoOpGetStrokeColor: SliceGetStrokeColorProc; NoOpSetFillColor: SliceSetFillColorProc; NoOpGetFillColor: SliceGetFillColorProc; NoOpSetArrows: SliceSetArrowsProc; NoOpGetArrows: SliceGetArrowsProc; END. ŒGGSlice.mesa Copyright c 1986, 1987 by Xerox Corporation. All rights reserved. Last edited by Bier on January 28, 1987 8:54:06 pm PST Contents: Implements the various slice classes in Gargoyle. Pier, February 17, 1987 9:32:28 am PST Creation and Queries about Slice Classes Creation, Modification and Queries about Slices 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. Circle Slices Interpress Slices pixelsPerUnit explains what the unit was when the interpress master was made. The default value is for meters. NoOp Class Routines In GGSliceImplC.NoOpBoundBox Drawing Transforming Textual Description Hit Testing Style Κk˜codešœ ™ KšœB™BKšœ3Οk™6KšΟnœ4™Kšžœœœœ˜9Kšžœœœœ˜@Kšžœœœ œ˜7Kšž œœœ˜1Kšž œœ˜#Kšžœœœ"˜]Kšžœœœœ˜FKšž œœ5œ˜MKšž œœœ'œ˜VKšž œœ ˜2šž œœ˜#Kšœ«™«K™—K˜K™ K™Kšœ΄™΄K™KšœœΟc3˜ZKšœœ$˜.K˜šžœœœ˜8Kšœ#™#—Kšž œœ^œœ˜žK˜K™ K˜Kšžœœœ˜;Kš žœœ1œLœœ˜½K˜K™K™Kšžœœœ˜7šžœœ.œœœEœœœœ˜„Kšœo™o—Kšžœœjœœ˜€Kšžœœœœœœ œWœœ˜θKšžœœ œ˜=Kšžœœœœ˜FK˜K™Kšœ™K™Kšž œ˜ šžœ˜Kšœ™—Kšž œ˜"Kšžœ˜*Kšžœ!˜:šžœ!˜:Kšœ ™ —šž œ˜"Kšœ™—Kšž œ˜ Kšž œ˜šž œ˜Kšœ ™ —Kšžœ˜$Kšž œ˜ Kšžœ˜$Kšžœ˜.Kšžœ˜&Kšžœ˜$Kšžœ˜(Kšžœ˜4Kšžœ"˜