<> <> <> <> <> <> <<>> DIRECTORY GGBasicTypes, GGModelTypes, GGSegmentTypes, Imager, ImagerTransformation; GGBoundBox: CEDAR DEFINITIONS = BEGIN BoundBox: TYPE = GGModelTypes.BoundBox; Circle: TYPE = GGBasicTypes.Circle; Line: TYPE = GGBasicTypes.Line; Outline: TYPE = GGModelTypes.Outline; Point: TYPE = GGBasicTypes.Point; Scene: TYPE = GGModelTypes.Scene; Segment: TYPE = GGSegmentTypes.Segment; Sequence: TYPE = GGModelTypes.Sequence; Slice: TYPE = GGModelTypes.Slice; Traj: TYPE = GGModelTypes.Traj; Vector: TYPE = GGBasicTypes.Vector; emptyBoundBox: BoundBox; -- [loX, loY: LargestNumber, hiX, hiY: SmallestNormalizedNumber] <> <<>> CreateBoundBox: PROC [loX, loY, hiX, hiY: REAL, null: BOOL _ FALSE, infinite: BOOL _ FALSE] RETURNS [bBox: BoundBox]; NullBoundBox: PROC [] RETURNS [bBox: BoundBox]; CopyBoundBox: PROC [bBox: BoundBox] RETURNS [copy: BoundBox]; BoundBoxOfBoxes: PROC [list: LIST OF BoundBox] RETURNS [bigBox: BoundBox]; BoundBoxOfBoundBox: PROC [box: BoundBox, transform: ImagerTransformation.Transformation] RETURNS [newBox: BoundBox]; BoundBoxFromRectangle: PROC [rect: Imager.Rectangle] RETURNS [bBox: BoundBox]; RectangleFromBoundBox: PROC [bBox: BoundBox] RETURNS [rect: Imager.Rectangle]; BoundBoxOfPixelArray: PROC [pa: Imager.PixelArray] RETURNS [bBox: BoundBox]; <> BoundBoxOfBitMap: PROC [base: LONG POINTER, wordsPerLine: NAT, sMin, fMin, sSize, fSize: NAT, tx, ty: INTEGER _ 0] RETURNS [bBox: BoundBox]; <> <<>> <> <<>> AllowForJoints: PROC [box: BoundBox]; EnlargeByBox: PROC [bBox: BoundBox, by: BoundBox]; EnlargeByPoint: PROC [bBox: BoundBox, point: Point]; EnlargeByVector: PROC [bBox: BoundBox, vector: Vector]; <> EnlargeByOffset: PROC [bBox: BoundBox, offset: REAL]; <> UpdateBoundBox: PROC [bBox: BoundBox, loX, loY, hiX, hiY: REAL]; UpdateBoundBoxOfBoundBox: PROC [bBox: BoundBox, localBox: BoundBox, transform: ImagerTransformation.Transformation]; UpdateCopyBoundBox: PROC [bBox: BoundBox, from: BoundBox]; <> <> <<>> PointIsInBox: PROC [test: Point, box: GGBasicTypes.BoundBoxObj] RETURNS [BOOL]; <<>> <> <<>> <> BoundBoxOfSelected: PROC [scene: Scene, selectClass: GGSegmentTypes.SelectionClass _ normal] RETURNS [bigBox: BoundBox]; BoundBoxOfMoving: PROC [scene: Scene, selectClass: GGSegmentTypes.SelectionClass _ normal] RETURNS [bigBox: BoundBox]; <> DrawBoundBox: PROC [dc: Imager.Context, bBox: BoundBox]; EraseWithinBoundBox: PROC [dc: Imager.Context, bBox: BoundBox]; Clip: PROC [dc: Imager.Context, bBox: BoundBox]; <> MaskArray: TYPE = ARRAY[0..4) OF BOOL; NearestPoint: PROC [bBox: BoundBox, testPoint: Point, tolerance: REAL _ 1E6, mask: MaskArray _ ALL[TRUE]] RETURNS [bestDist: REAL, bestJoint: NAT, bestPoint: Point, success: BOOL]; NearestSegment: PROC [bBox: BoundBox, testPoint: Point, tolerance: REAL _ 1E6, mask: MaskArray _ ALL[TRUE]] RETURNS [bestDist: REAL, bestSeg: NAT, bestPoint: Point, success: BOOL]; LineMeetsBoundBox: PROC [bBox: BoundBox, line: Line] RETURNS [points: LIST OF Point, pointCount: NAT]; <> CircleMeetsBoundBox: PROC [bBox: BoundBox, circle: Circle] RETURNS [points: LIST OF Point, pointCount: NAT]; <> END.