---
title: "scaleEffect(_:anchor:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/scaleeffect(_:anchor:)-7q7as"
---

# scaleEffect(_:anchor:)

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

## Declaration

```swift
nonisolated func scaleEffect(_ scale: CGSize, anchor: UnitPoint = .center) -> some View

```

## Parameters

- `scale`: A doc://com.apple.documentation/documentation/CoreFoundation/CGSize that represents the horizontal and vertical amount to scale the view.
- `anchor`: The point with a default of doc://com.apple.SwiftUI/documentation/SwiftUI/UnitPoint/center that defines the location within the view from which to apply the transformation.

## Discussion

Discussion Use scaleEffect(_:anchor:) to scale a view by applying a scaling transform of a specific size, specified by scale. Image(systemName: "envelope.badge.fill")     .resizable()     .frame(width: 100, height: 100, alignment: .center)     .foregroundColor(Color.red)     .scaleEffect(CGSize(x: 0.9, y: 1.3), anchor: .leading)     .border(Color.gray)
