Instance Method

concatenate(_:)

Transforms the user coordinate system in a context using a specified matrix.

Declaration

func concatenate(_ transform: CGAffineTransform)

Parameters

transform

The transformation matrix to apply to the specified context’s current transformation matrix.

Discussion

When you call this function, it concatenates (that is, it combines) two matrices, by multiplying them together. The order in which matrices are concatenated is important, as the operations are not commutative. The resulting CTM in the context is: CTMnew = transform * CTMcontext.

See Also

Working with the Current Transformation Matrix

var ctm: CGAffineTransform

Returns the current transformation matrix.

func rotate(by: CGFloat)

Rotates the user coordinate system in a context.

func scaleBy(x: CGFloat, y: CGFloat)

Changes the scale of the user coordinate system in a context.

func translateBy(x: CGFloat, y: CGFloat)

Changes the origin of the user coordinate system in a context.

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