---
title: "scaleEffect(x:y:anchor:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/scaleeffect(x:y:anchor:)"
---

# scaleEffect(x:y:anchor:)

Scales this view’s rendered output by the given horizontal and vertical amounts, relative to an anchor point.

## Declaration

```swift
nonisolated func scaleEffect(x: CGFloat = 1.0, y: CGFloat = 1.0, anchor: UnitPoint = .center) -> some View

```

## Parameters

- `x`: An amount that represents the horizontal amount to scale the view. The default value is 1.0.
- `y`: An amount that represents the vertical amount to scale the view. The default value is 1.0.
- `anchor`: The anchor point that indicates the starting position for the scale operation.

## Discussion

Discussion Use scaleEffect(x:y:anchor:) to apply a scaling transform to a view by a specific horizontal and vertical amount. Image(systemName: "envelope.badge.fill")     .resizable()     .frame(width: 100, height: 100, alignment: .center)     .foregroundColor(Color.red)     .scaleEffect(x: 0.5, y: 0.5, anchor: .bottomTrailing)     .border(Color.gray)

## See Also

### Scaling, rotating, or transforming a view

- [scaledToFill()](swiftui/view/scaledtofill().md)
- [scaledToFit()](swiftui/view/scaledtofit().md)
- [scaleEffect(_:anchor:)](swiftui/view/scaleeffect(_:anchor:).md)
- [scaleEffect(_:anchor:)](swiftui/view/scaleeffect(_:anchor:).md)
- [scaleEffect(x:y:z:anchor:)](swiftui/view/scaleeffect(x:y:z:anchor:).md)
- [aspectRatio(_:contentMode:)](swiftui/view/aspectratio(_:contentmode:).md)
- [rotationEffect(_:anchor:)](swiftui/view/rotationeffect(_:anchor:).md)
- [rotation3DEffect(_:axis:anchor:anchorZ:perspective:)](swiftui/view/rotation3deffect(_:axis:anchor:anchorz:perspective:).md)
- [perspectiveRotationEffect(_:axis:anchor:anchorZ:perspective:)](swiftui/view/perspectiverotationeffect(_:axis:anchor:anchorz:perspective:).md)
- [rotation3DEffect(_:anchor:)](swiftui/view/rotation3deffect(_:anchor:).md)
- [rotation3DEffect(_:axis:anchor:)](swiftui/view/rotation3deffect(_:axis:anchor:).md)
- [transformEffect(_:)](swiftui/view/transformeffect(_:).md)
- [transform3DEffect(_:)](swiftui/view/transform3deffect(_:).md)
- [projectionEffect(_:)](swiftui/view/projectioneffect(_:).md)
- [ProjectionTransform](swiftui/projectiontransform.md)
