Linear

data class Linear(val stops: ImmutableList<GradientStop>, val start: GradientPoint, val end: GradientPoint, val span: GradientSpan, val tileMode: TileMode) : ChartGradient(source)

A gradient along the line from start to end.

Constructors

Link copied to clipboard
constructor(stops: ImmutableList<GradientStop>, start: GradientPoint, end: GradientPoint, span: GradientSpan, tileMode: TileMode)
constructor(stops: List<GradientStop>, start: GradientPoint, end: GradientPoint, span: GradientSpan, tileMode: TileMode)

Copies the supplied stops into an immutable list.

Properties

Link copied to clipboard

End position as fractions of the selected bounds.

Link copied to clipboard
open override val span: GradientSpan

The bounds the gradient's positions are fractions of.

Link copied to clipboard

Start position as fractions of the selected bounds.

Link copied to clipboard
open override val stops: ImmutableList<GradientStop>

The colors along the gradient, with offsets in 0..1. Offsets outside that range are clamped, stops out of order are sorted, and a stop with a non-finite offset is dropped. A single stop paints its color solid, and no stops draw the shape without a gradient.

Link copied to clipboard

How the gradient continues beyond start and end.