---
title: "scale(x:y:anchor:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/shape/scale(x:y:anchor:)"
---

# scale(x:y:anchor:)

Scales this shape without changing its bounding frame.

## Declaration

```swift
nonisolated func scale(x: CGFloat = 1, y: CGFloat = 1, anchor: UnitPoint = .center) -> ScaledShape<Self>
```

## Parameters

- `x`: The multiplication factor used to resize this shape along its x-axis.
- `y`: The multiplication factor used to resize this shape along its y-axis.

## Return Value

Return Value A scaled form of this shape.

## Discussion

Discussion Both the x and y multiplication factors halve their respective dimension’s size when set to 0.5, maintain their existing size when set to 1, double their size when set to 2, and so forth.

## See Also

### Transforming a shape

- [trim(from:to:)](swiftui/shape/trim(from:to:).md)
- [transform(_:)](swiftui/shape/transform(_:).md)
- [size(_:)](swiftui/shape/size(_:).md)
- [size(width:height:)](swiftui/shape/size(width:height:).md)
- [scale(_:anchor:)](swiftui/shape/scale(_:anchor:).md)
- [rotation(_:anchor:)](swiftui/shape/rotation(_:anchor:).md)
- [offset(_:)](swiftui/shape/offset(_:).md)
- [offset(x:y:)](swiftui/shape/offset(x:y:).md)
