RadialGradient

data class RadialGradient(val center: Vector2, val radius: Double, val focal: Vector2 = center, val focalRadius: Double = 0.0, val stops: List<ColorStop>, val units: PaintUnits = PaintUnits.BOUNDS, val spread: GradientSpread = GradientSpread.PAD, val transform: Matrix44 = Matrix44.IDENTITY, val id: String = "", val interpolation: GradientInterpolation = GradientInterpolation.SRGB) : Paint.Gradient(source)

A radial gradient from the circle at focal with focalRadius to the circle at center with radius, like SVG's radialGradient

Constructors

Link copied to clipboard
constructor(center: Vector2, radius: Double, focal: Vector2 = center, focalRadius: Double = 0.0, stops: List<ColorStop>, units: PaintUnits = PaintUnits.BOUNDS, spread: GradientSpread = GradientSpread.PAD, transform: Matrix44 = Matrix44.IDENTITY, id: String = "", interpolation: GradientInterpolation = GradientInterpolation.SRGB)

Properties

Link copied to clipboard
val center: Vector2
Link copied to clipboard
val focal: Vector2
Link copied to clipboard
Link copied to clipboard
open override val id: String
Link copied to clipboard

the color space the colors are interpolated in, sRGB like SVG by default

Link copied to clipboard
Link copied to clipboard
open override val spread: GradientSpread
Link copied to clipboard
open override val stops: List<ColorStop>
Link copied to clipboard
open val svgId: String

the id of the gradient in SVG documents: id, or an id derived from the gradient when it has none

Link copied to clipboard
open override val transform: Matrix44
Link copied to clipboard
open override val units: PaintUnits
Link copied to clipboard
open override val value: ColorRGBa?

Functions

Link copied to clipboard
open override fun source(): SourcePreset

the preset that generates the colors of this paint

Link copied to clipboard
open override fun toString(): String