Function

CGAffineTransformTranslate

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

Declaration

CGAffineTransform CGAffineTransformTranslate(CGAffineTransform t, CGFloat tx, CGFloat ty);

Parameters

t

An existing affine transform.

tx

The value by which to move x values with the affine transform.

ty

The value by which to move y values with the affine transform.

Return Value

A new affine transformation matrix.

Discussion

You use this function to create a new affine transform by adding translation values to an existing affine transform. The resulting structure represents a new affine transform, which you can use (and reuse, if you want) to move a coordinate system.

See Also

Modifying Affine Transformations

CGAffineTransformScale

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

CGAffineTransformRotate

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

CGAffineTransformInvert

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

CGAffineTransformConcat

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