Function

CGContextConcatCTM

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

Declaration

void CGContextConcatCTM(CGContextRef c, CGAffineTransform transform);

Parameters

c

A graphics context.

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

Transforming User Space

CGContextGetCTM

Returns the current transformation matrix.

CGContextRotateCTM

Rotates the user coordinate system in a context.

CGContextScaleCTM

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

CGContextTranslateCTM

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