Contents

CGAffineTransform

An affine transformation matrix for use in drawing 2D graphics.

Overview

A transformation specifies how points in one coordinate system map to points in another coordinate system. An affine transformation is a special type of mapping that preserves parallel lines in a path but does not necessarily preserve lengths or angles. Scaling, rotation, and translation are the most commonly used manipulations supported by affine transforms, but skewing is also possible.

For more information on how to create, concatenate, and apply affine transformations, see Quartz 2D Programming Guide.

You typically do not need to create an affine transform directly—CGContext describes functions that modify the current affine transform. If you don’t plan to reuse an affine transform, you may want to use scaleBy(x:y:), rotate(by:), translateBy(x:y:), or concatenate(_:).

Topics

Creating an Affine Transformation Matrix

Modifying Affine Transformations

Applying Affine Transformations

Evaluating Affine Transforms

Data Types

Constants

See Also

Related Documentation

  • Quartz 2D Programming Guide