scaleEffect(_:anchor:)
Scales this view uniformly by the specified factor, relative to an anchor point.
Declaration
@export(implementation) nonisolated func scaleEffect(_ s: CGFloat, anchor: UnitPoint3D = .center) -> some View
Parameters
- s:
The scale factor for this view.
- anchor:
The anchor point about which to scale the view. Defaults to center.
Return Value
A view that scales this view by s in all dimensions.
Discussion
The original dimensions of the view are considered to be unchanged by scaling the contents. To change the dimensions of the view, use a modifier like frame() instead.
See Also
Scaling, rotating, or transforming a view
scaledToFill()scaledToFit()scaleEffect(x:y:anchor:)scaleEffect(x:y:z:anchor:)aspectRatio(_:contentMode:)rotationEffect(_:anchor:)rotation3DEffect(_:axis:anchor:anchorZ:perspective:)perspectiveRotationEffect(_:axis:anchor:anchorZ:perspective:)rotation3DEffect(_:anchor:)rotation3DEffect(_:axis:anchor:)transformEffect(_:)transform3DEffect(_:)projectionEffect(_:)ProjectionTransformContentMode