DIRECTORY GGModelTypes, ImagerTransformation; GGBoxSlice: CEDAR DEFINITIONS = BEGIN Slice: TYPE = GGModelTypes.Slice; SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor; SliceClass: TYPE = GGModelTypes.SliceClass; BoundBox: TYPE = GGModelTypes.BoundBox; Corner: TYPE = {none, ll, lr, ul, ur}; -- lower left, lower right, upper left, upper right Edge: TYPE = {none, left, right, top, bottom}; MakeBoxSlice: PROC [box: BoundBox, corner: Corner, transform: ImagerTransformation.Transformation, strokeWidth: REAL _ 1.0] RETURNS [sliceD: SliceDescriptor]; BuildBoxSliceClass: PROC [] RETURNS [class: SliceClass]; GetBox: PROC [slice: Slice] RETURNS [box: BoundBox]; END. ¾GGBoxSlice.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Last edited by Pier on April 29, 1986 3:41:51 pm PDT Contents: Implements the box slice class in Gargoyle. Bier, May 28, 1986 10:12:31 pm PDT 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. ʘcodešœ™Kšœ Ïmœ1™