DIRECTORY ImagerTransformation, GGModelTypes, GGTransform; GGTransformImpl: CEDAR PROGRAM IMPORTS ImagerTransformation EXPORTS GGTransform = BEGIN Point: TYPE = GGModelTypes.Point; Transform: PUBLIC PROC [m: ImagerTransformation.Transformation, p: Point] RETURNS [newP: Point] = { result: ImagerTransformation.VEC; result _ ImagerTransformation.Transform[m, [p[1], p[2]] ]; newP _ [result.x, result.y]; }; RotateAboutPoint: PUBLIC PROC [origin: Point, degrees: REAL] RETURNS [m: ImagerTransformation.Transformation] = { m _ ImagerTransformation.Translate[ [-origin[1], -origin[2]] ]; m _ ImagerTransformation.PostRotate[m, degrees]; m _ ImagerTransformation.PostTranslate[m, [origin[1], origin[2]]]; }; ScaleAboutPoint: PUBLIC PROC [origin: Point, scalar: REAL] RETURNS [m: ImagerTransformation.Transformation] = { m _ ImagerTransformation.Translate[ [-origin[1], -origin[2]] ]; m _ ImagerTransformation.PostScale[m, scalar]; m _ ImagerTransformation.PostTranslate[m, [origin[1], origin[2]]]; }; ScaleUnevenAboutPoint: PUBLIC PROC [origin: Point, scalarX: REAL, scalarY: REAL] RETURNS [m: ImagerTransformation.Transformation] = { m _ ImagerTransformation.Translate[ [-origin[1], -origin[2]] ]; m _ ImagerTransformation.PostScale2[m, [scalarX, scalarY]]; m _ ImagerTransformation.PostTranslate[m, [origin[1], origin[2]]]; }; END. ΦGGTransformImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by Bier on August 19, 1985 2:38:35 pm PDT Contents: A layer on top of ImagerTransformation for use in Gargoyle. Κu˜head1™Icodešœ Οmœ1™