Contents

radialGradient(_:center:startRadius:endRadius:options:)

Returns a shading instance that fills a radial gradient.

Declaration

static func radialGradient(_ gradient: Gradient, center: CGPoint, startRadius: CGFloat, endRadius: CGFloat, options: GraphicsContext.GradientOptions = GradientOptions()) -> GraphicsContext.Shading

Parameters

  • gradient:

    A Gradient instance that defines the colors of the gradient.

  • center:

    The point in the current user space on which SwiftUI centers the gradient.

  • startRadius:

    The distance from the center where the gradient starts.

  • endRadius:

    The distance from the center where the gradient ends.

  • options:

    Options that you use to configure the gradient.

Return Value

A shading instance filled with a radial gradient.

See Also

Gradients