RadialGradientPaint

class RadialGradientPaint(center: Vector2 = Vector2(0.5, 0.5), radius: Double = 0.5, focal: Vector2 = center, focalRadius: Double = 0.0, stops: List<ColorStop> = listOf(ColorStop(0.0, ColorRGBa.WHITE), ColorStop(1.0, ColorRGBa.BLACK)), spread: GradientSpread = GradientSpread.PAD) : StopsGradientPaint(source)

A radial gradient, like SVG's radialGradient: offset 0 is the circle at focal with radius focalRadius, offset 1 the circle at center with radius, the circles in between are interpolated

Constructors

Link copied to clipboard
constructor(center: Vector2 = Vector2(0.5, 0.5), radius: Double = 0.5, focal: Vector2 = center, focalRadius: Double = 0.0, stops: List<ColorStop> = listOf(ColorStop(0.0, ColorRGBa.WHITE), ColorStop(1.0, ColorRGBa.BLACK)), spread: GradientSpread = GradientSpread.PAD)

Properties

Link copied to clipboard
var center: Vector2
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 focal: Vector2
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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