Instance Method

concatenating(_:)

Returns an affine transformation matrix constructed by combining two existing affine transforms.

Declaration

func concatenating(_ t2: CGAffineTransform) -> CGAffineTransform

Parameters

t2

The affine transform to concatenate to this affine transform.

Return Value

A new affine transformation matrix. That is, t’ = t1*t2.

Discussion

Concatenation combines two affine transformation matrices by multiplying them together. You might perform several concatenations in order to create a single affine transform that contains the cumulative effects of several transformations.

Note that matrix operations are not commutative—the order in which you concatenate matrices is important. That is, the result of multiplying matrix t1 by matrix t2 does not necessarily equal the result of multiplying matrix t2 by matrix t1.

See Also

Modifying Affine Transformations

func translatedBy(x: CGFloat, y: CGFloat) -> CGAffineTransform

Returns an affine transformation matrix constructed by translating an existing affine transform.

func scaledBy(x: CGFloat, y: CGFloat) -> CGAffineTransform

Returns an affine transformation matrix constructed by scaling an existing affine transform.

func rotated(by: CGFloat) -> CGAffineTransform

Returns an affine transformation matrix constructed by rotating an existing affine transform.

func inverted() -> CGAffineTransform

Returns an affine transformation matrix constructed by inverting an existing affine transform.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software