Contents

CGAffineTransformTranslate(_:_:_:)

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

Declaration

func CGAffineTransformTranslate(_ t: CGAffineTransform, _ tx: CGFloat, _ ty: CGFloat) -> CGAffineTransform

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