Function

CGAffineTransformInvert

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

Declaration

CGAffineTransform CGAffineTransformInvert(CGAffineTransform t);

Parameters

t

An existing affine transform.

Return Value

A new affine transformation matrix. If the affine transform passed in parameter t cannot be inverted, the affine transform is returned unchanged.

Discussion

Inversion is generally used to provide reverse transformation of points within transformed objects. Given the coordinates (x,y), which have been transformed by a given matrix to new coordinates (x’,y’), transforming the coordinates (x’,y’) by the inverse matrix produces the original coordinates (x,y).

See Also

Modifying Affine Transformations

CGAffineTransformTranslate

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

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.

CGAffineTransformConcat

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