transform

Applies an affine transform to this shape.

Shape ModifieriOS 13.0+macOS 10.15+tvOS 13.0+watchOS 6.0+transform(_:) in SwiftUI

Declaration

React
compose().transform(transform: CGAffineTransform)
Swift
nonisolated func transform(
    _ transform: CGAffineTransform
) -> TransformedShape<Self>

Parameters

  • transform*CGAffineTransform

    The affine transformation matrix to apply to this shape.

Return value

A transformed shape, based on its matrix values.

Discussion

Affine transforms present a mathematical approach to applying combinations of rotation, scaling, translation, and skew to shapes.

See also

More in Shape modifiers.