Function

CGAffineTransformMake

Returns an affine transformation matrix constructed from values you provide.

Declaration

CGAffineTransform CGAffineTransformMake(CGFloat a, CGFloat b, CGFloat c, CGFloat d, CGFloat tx, CGFloat ty);

Parameters

a

The value at position [1,1] in the matrix.

b

The value at position [1,2] in the matrix.

c

The value at position [2,1] in the matrix.

d

The value at position [2,2] in the matrix.

tx

The value at position [3,1] in the matrix.

ty

The value at position [3,2] in the matrix.

Return Value

A new affine transform matrix constructed from the values you specify.

Discussion

This function creates a CGAffineTransform structure that represents a new affine transformation matrix, which you can use (and reuse, if you want) to transform a coordinate system. The matrix takes the following form:

A 3 by 3 matrix.

Because the third column is always (0,0,1), the CGAffineTransform data structure returned by this function contains values for only the first two columns.

If you want only to transform an object to be drawn, it is not necessary to construct an affine transform to do so. The most direct way to transform your drawing is by calling the appropriate CGContext function to adjust the current transformation matrix. For a list of functions, see CGContext.

See Also

Creating an Affine Transformation Matrix

CGAffineTransformMakeRotation

Returns an affine transformation matrix constructed from a rotation value you provide.

CGAffineTransformMakeScale

Returns an affine transformation matrix constructed from scaling values you provide.

CGAffineTransformMakeTranslation

Returns an affine transformation matrix constructed from translation values you provide.