---
title: "CGAffineTransformTranslate(_:_:_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgaffinetransformtranslate(_:_:_:)"
---

# CGAffineTransformTranslate(_:_:_:)

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

## Declaration

```swift
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

Return Value A new affine transformation matrix.

## Discussion

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(_:_:_:)](coregraphics/cgaffinetransformscale(_:_:_:).md)
- [CGAffineTransformRotate(_:_:)](coregraphics/cgaffinetransformrotate(_:_:).md)
- [CGAffineTransformInvert(_:)](coregraphics/cgaffinetransforminvert(_:).md)
- [CGAffineTransformConcat(_:_:)](coregraphics/cgaffinetransformconcat(_:_:).md)
