CGAffineTransformInvert(_:)
Returns an affine transformation matrix constructed by inverting an existing affine transform.
Declaration
func CGAffineTransformInvert(_ t: CGAffineTransform) -> CGAffineTransformParameters
- 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).