DIRECTORY BiScrollersTransformsTypes, Geom2D, ImagerTransformation, Vector2; BiScrollersTransforms: CEDAR DEFINITIONS = BEGIN AgeOp: TYPE = BiScrollersTransformsTypes.AgeOp; Axis: TYPE = Geom2D.Axis; Location: TYPE = BiScrollersTransformsTypes.Location; Preservation: TYPE = REAL--[0.0 .. 1.0]--; PreservationPair: TYPE = ARRAY Axis OF Preservation; Rect: TYPE = Geom2D.Rect; RotateOp: TYPE = BiScrollersTransformsTypes.RotateOp; ScaleOp: TYPE = BiScrollersTransformsTypes.ScaleOp; Transform: TYPE = ImagerTransformation.Transformation; Vec: TYPE = Vector2.VEC; Scale: PROC [old: Transform, op: ScaleOp, cw, ch: REAL, pp: PreservationPair, vanilla: Transform _ NIL, mayStretch: BOOL _ TRUE] RETURNS [new: Transform]; Rotate: PROC [old: Transform, op: RotateOp, cw, ch: REAL, pp: PreservationPair, vanilla: Transform _ NIL] RETURNS [new: Transform]; Shift: PROC [old: Transform, dx, dy: REAL] RETURNS [new: Transform]; Align: PROC [old: Transform, client, viewer: Location, doX, doY: BOOL ¬ TRUE, cw, ch: REAL, extremaProc: ExtremaProc, clientData: REF, ageOp: AgeOp ¬ remember] RETURNS [new: Transform]; BoxScale: PROC [old: Transform, from, to: Rect --both in viewer coords--, uniformly: BOOL ¬ TRUE, mayStretch: BOOL _ TRUE, preferIntegerCoefficients: BOOL _ FALSE] RETURNS [new: Transform]; ExtremaProc: TYPE = PROC [clientData: REF, direction: Vec] RETURNS [min, max: Vec]; Fit: PROC [old: Transform, uniformly: BOOL, cw, ch: REAL, extremaProc: ExtremaProc, clientData: REF, mayStretch: BOOL _ TRUE, preferIntegerCoefficients: BOOL _ FALSE] RETURNS [new: Transform]; DoBSUserAction: PROC [old: Transform, input: LIST OF REF, cw, ch: REAL, pp: PreservationPair, vanilla, previous: Transform _ NIL, mayStretch: BOOL _ FALSE, preferIntegerCoefficients: BOOL _ FALSE, extremaProc: ExtremaProc, clientData: REF] RETURNS [new: Transform]; END. ΄ BiScrollersTransforms.mesa Copyright c 1992 by Xerox Corporation. All rights reserved. Bier, March 19, 1993 5:29 pm PST Contents: A viewers-independent way to perform the BiScrollers transformations on a transformation matrix horizontally (axis X), 0.0 is left and 1.0 is right; vertically (axis Y), 0.0 is bottom and 1.0 is top. old is the clientToViewer transformation old is the clientToViewer transformation old is the clientToViewer transformation old is the clientToViewer transformation old is the clientToViewer transformation Change scale and offsets so that client data previously in `from' covers as much as possible of `to'. old is the clientToViewer transformation Κ\•NewlineDelimiter ™code™Kšœ Οmœ1™