<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/scaleEffect(x:y:anchor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE11scaleEffect1x1y6anchorQr14CoreFoundation7CGFloatV_AjA9UnitPointVtF"
  },
  "title" : "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.

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

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

![A screenshot showing a 100x100 pixel red envelope scaled down 50% in](images/com.apple.SwiftUI/SwiftUI-View-scaleEffect-xy@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)