LinearGradientPaint

class LinearGradientPaint(start: Vector2 = Vector2(0.0, 0.0), end: Vector2 = Vector2(1.0, 0.0), stops: List<ColorStop> = listOf(ColorStop(0.0, ColorRGBa.BLACK), ColorStop(1.0, ColorRGBa.WHITE)), spread: GradientSpread = GradientSpread.PAD) : StopsGradientPaint(source)

A linear gradient from start (offset 0) to end (offset 1), like SVG's linearGradient

Constructors

Link copied to clipboard
constructor(start: Vector2 = Vector2(0.0, 0.0), end: Vector2 = Vector2(1.0, 0.0), stops: List<ColorStop> = listOf(ColorStop(0.0, ColorRGBa.BLACK), ColorStop(1.0, ColorRGBa.WHITE)), spread: GradientSpread = GradientSpread.PAD)

Properties

Link copied to clipboard
open override val contract: GlslContract

the signature of the dynamic parameter of this preset

Link copied to clipboard
open override val dynamicParameter: GlslFunction
Link copied to clipboard
var end: Vector2
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var start: Vector2
Link copied to clipboard

the color stops, sorted by offset when they are set

Functions

Link copied to clipboard

true when this preset can read the values of fxContextLibrary, also through the presets in its slots, so that it changes over time even when nothing else does, see DynamicParameter.readsFxContext