---
title: "scaleX(by:yBy:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsaffinetransform/scalex(by:yby:)"
---

# scaleX(by:yBy:)

Applies scaling factors to each axis of the receiver’s transformation matrix.

## Declaration

```swift
func scaleX(by scaleX: Double, yBy scaleY: Double)
```

## Parameters

- `scaleX`: The scaling factor to apply to the x axis.
- `scaleY`: The scaling factor to apply to the y axis.

## Discussion

Discussion After invoking this method, applying the receiver’s matrix modifies the unit length on the x axis by a factor of scaleX and the y axis by a factor of scaleY, in addition to performing all previous transformations. A value of 1.0 for either axis scales the content on that axis to the same size.

## See Also

### Accumulating Transformations

- [rotate(byDegrees:)](foundation/nsaffinetransform/rotate(bydegrees:).md)
- [rotate(byRadians:)](foundation/nsaffinetransform/rotate(byradians:).md)
- [scale(by:)](foundation/nsaffinetransform/scale(by:).md)
- [translateX(by:yBy:)](foundation/nsaffinetransform/translatex(by:yby:).md)
- [append(_:)](foundation/nsaffinetransform/append(_:).md)
- [prepend(_:)](foundation/nsaffinetransform/prepend(_:).md)
- [invert()](foundation/nsaffinetransform/invert().md)
