scale

Scales this shape without changing its bounding frame.

Shape ModifieriOS 13.0+macOS 10.15+tvOS 13.0+watchOS 6.0+

Overloads

2 ways to call compose().scale(). Each is one SwiftUI overload, picked by the arguments you pass.

React
compose().scale(
  scale: number,
  options?: {
    anchor?: SwiftUI.UnitPoint;
  }
)
Swift
nonisolated func scale(
    _ scale: CGFloat,
    anchor: UnitPoint = .center
) -> ScaledShape<Self>

Parameters

  • scale*number

    The multiplication factor used to resize this shape. A value of 0 scales the shape to have no size, 0.5 scales to half size in both dimensions, 2 scales to twice the regular size, and so on.

  • options.anchorSwiftUI.UnitPoint

    The point to rotate the shape around.

Return value

A scaled form of this shape.

See also

More in Shape modifiers.