ColorBuilders.LinearGradient


@RequiresSchemaVersion(major = 1, minor = 500)
class ColorBuilders.LinearGradient : ColorBuilders.Brush


A linear gradient with the provided colors based on defined start and end coordinates.

The colors are dispersed at the offsets defined in each color stop.

Summary

Nested types

Builder for LinearGradient.

Public functions

(Mutable)List<ColorBuilders.ColorStop!>

Gets the color stops defining how the colors are distributed from the start to the end coordinates.

DimensionBuilders.OffsetDimension?

Gets the ending y position of the linear gradient.

DimensionBuilders.OffsetDimension?

Gets the ending y position of the linear gradient.

DimensionBuilders.OffsetDimension?

Gets the starting x position of the linear gradient.

DimensionBuilders.OffsetDimension?

Gets the starting y position of the linear gradient.

String

Public functions

getColorStops

Added in 1.3.0-alpha06
fun getColorStops(): (Mutable)List<ColorBuilders.ColorStop!>

Gets the color stops defining how the colors are distributed from the start to the end coordinates.

A color stop is a pair of a color and its offset in the gradient. The offset is the relative position of the color, beginning with 0 at the start coordinate and ending with 1.0 at the end coordinate.

There must be at least 2 colors and at most 10 colors.

If offset values are not set, the colors are evenly distributed in the gradient.

getEndX

Added in 1.3.0-alpha06
fun getEndX(): DimensionBuilders.OffsetDimension?

Gets the ending y position of the linear gradient. Defaults to the right side of the element.

getEndY

Added in 1.3.0-alpha06
fun getEndY(): DimensionBuilders.OffsetDimension?

Gets the ending y position of the linear gradient. Defaults to the top side of the element.

getStartX

Added in 1.3.0-alpha06
fun getStartX(): DimensionBuilders.OffsetDimension?

Gets the starting x position of the linear gradient. Defaults to the left side of the element.

getStartY

Added in 1.3.0-alpha06
fun getStartY(): DimensionBuilders.OffsetDimension?

Gets the starting y position of the linear gradient. Defaults to the top side of the element.

toString

fun toString(): String