---
title: "CGAffineTransformScale(_:_:_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgaffinetransformscale(_:_:_:)"
---

# CGAffineTransformScale(_:_:_:)

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

## Declaration

```swift
func CGAffineTransformScale(_ t: CGAffineTransform, _ sx: CGFloat, _ sy: CGFloat) -> CGAffineTransform
```

## Parameters

- `t`: An existing affine transform.
- `sx`: The value by which to scale x values of the affine transform.
- `sy`: The value by which to scale y values of the affine transform.

## Return Value

Return Value A new affine transformation matrix.

## Discussion

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

## See Also

### Modifying Affine Transformations

- [CGAffineTransformTranslate(_:_:_:)](coregraphics/cgaffinetransformtranslate(_:_:_:).md)
- [CGAffineTransformRotate(_:_:)](coregraphics/cgaffinetransformrotate(_:_:).md)
- [CGAffineTransformInvert(_:)](coregraphics/cgaffinetransforminvert(_:).md)
- [CGAffineTransformConcat(_:_:)](coregraphics/cgaffinetransformconcat(_:_:).md)
