An angular gradient.


@frozen struct AngularGradient


An angular gradient is also known as a “conic” gradient. This gradient applies the color function as the angle changes, relative to a center point and defined start and end angles. If endAngle - startAngle > 2π, the gradient only draws the last complete turn. If endAngle - startAngle < 2π, the gradient fills the missing area with the colors defined by gradient locations one and zero, transitioning between the two halfway across the missing area. The gradient maps the unit-space center point into the bounding rectangle of each shape filled with the gradient.


Applying Standard Modifiers

View Modifiers

Configure this view and the views it contains by applying standard modifiers.


Conforms To

See Also

Paints, Styles, and Gradients

struct Color

An environment-dependent color.

struct ImagePaint

A paint type that repeats an image over the infinite plane.

struct Gradient

A color gradient represented as an array of color stops, each having a parametric location value.

struct LinearGradient

A linear gradient.

struct RadialGradient

A radial gradient.

struct FillStyle

A style for rasterizing vector shapes.

protocol ShapeStyle

A way to turn a shape into a view.

enum RoundedCornerStyle

Defines the shape of a rounded rectangle’s corners.