Skip to main content
Represents a gradient used for filling or stroking a shape. A gradient is defined by a set of color stops (GradientStop) and either a linear or radial configuration.

Constructors

linear

Creates a linear gradient that transitions between the specified color stops along the line from ‘from’ to ‘to’.

radial

Creates a radial gradient centered at ‘from’, extending outward to the given radius, using the specified color stops.