Next Previous Up Top Contents Index

2.3 DUIM-Geometry Module

make-scaling-transform

Function

Summary

Returns a transform that multiplies the x-coordinate distance of every point from origin by scale-x and the y-coordinate distance of every point from origin by scale-y.

Signature

make-scaling-transform scale-x scale-y #key origin-x origin-y => transform
make-scaling-transform* scale-x scale-y #key origin => transform

Arguments

scale-x
An instance of type <real>.

scale-y
An instance of type <real>.

The following arguments are specific to make-scaling-transform.

origin-x
An instance of type <real>. Default value: 0.

origin-y
An instance of type <real>. Default value: 0.

The following argument is specific to make-scaling-transform*.

origin
An instance of type <point>.

Values

transform
An instance of type <transform>. The resultant transformation.

Library

duim-geometry

Module

duim-geometry

Description

Returns a transform that multiplies the x-coordinate distance of every point from origin by scale-x and the y-coordinate distance of every point from origin by scale-y.

The argument scale-x represents the scaling factor for the x direction.

The argument scale-y represents the scaling factor for the y direction.

The arguments origin-x and origin-y represent the point around which scaling is performed. The default is to scale around the origin.

There is no single definition of a scaling transformation. Transforms that preserve all angles and multiply all lengths by the same factor (preserving the shape of all entities) are certainly scaling transformations. However, scaling is also used to refer to transforms that scale distances in the x direction by one amount and distances in the y direction by another amount.

The function make-scaling-transform* is identical to make-scaling-transform, except that it passes composite objects, rather than separate coordinates, in its arguments. You should be aware that using this function may lead to a loss of performance.

See also

make-reflection-transform, page 37

make-rotation-transform, page 39

make-transform, page 42

make-translation-transform, page 43


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index