Contents

radialGradient(_:startCenter:startRadius:endCenter:endRadius:options:)

Returns a shading that fills a two-point radial gradient.

Declaration

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

Parameters

  • gradient:

    An Anygradient instance that defines the colors of the gradient.

  • startCenter:

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

  • startRadius:

    The distance from the center where the gradient starts.

  • endCenter:

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

  • 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.