GradientPaint

data class GradientPaint(val kind: GradientKind, val x0: Double, val y0: Double, val r0: Double, val x1: Double, val y1: Double, val r1: Double, val stops: DoubleArrayList = DoubleArrayList(), val colors: IntArrayList = IntArrayList(), val cycle: CycleMethod = CycleMethod.NO_CYCLE, val transform: Matrix = Matrix.IDENTITY, val interpolationMethod: GradientInterpolationMethod = GradientInterpolationMethod.NORMAL, val units: GradientUnits = GradientUnits.OBJECT_BOUNDING_BOX, val startAngle: Angle = Angle.ZERO) : TransformedPaint

Constructors

Link copied to clipboard
constructor(kind: GradientKind, x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double, stops: DoubleArrayList = DoubleArrayList(), colors: IntArrayList = IntArrayList(), cycle: CycleMethod = CycleMethod.NO_CYCLE, transform: Matrix = Matrix.IDENTITY, interpolationMethod: GradientInterpolationMethod = GradientInterpolationMethod.NORMAL, units: GradientUnits = GradientUnits.OBJECT_BOUNDING_BOX, startAngle: Angle = Angle.ZERO)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val r0: Double
Link copied to clipboard
val r1: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val transform: Matrix
Link copied to clipboard
Link copied to clipboard
open override val units: GradientUnits
Link copied to clipboard
val x0: Double
Link copied to clipboard
val x1: Double
Link copied to clipboard
val y0: Double
Link copied to clipboard
val y1: Double

Functions

Link copied to clipboard
fun add(stop: Double, color: RGBA): GradientPaint
Link copied to clipboard
inline fun <T : RGBA> GradientPaint.add(vararg colors: T): GradientPaint

Adds colors to the gradient equidistantly

Adds color stops to the gradient in the pairs list being the left of the pair the ratio between 0.0 and 1.0, and the right of the pair the Color

Adds colors c0 and c1 to the gradient equidistantly

Adds colors c0, c1 and c2 to the gradient equidistantly

fun GradientPaint.add(c0: RGBA, c1: RGBA, c2: RGBA, c3: RGBA): GradientPaint

Adds colors c0, c1, c2 and c3 to the gradient equidistantly

Link copied to clipboard
fun addColorStop(stop: Ratio, color: RGBA): GradientPaint
inline fun addColorStop(stop: Number, color: RGBA): GradientPaint
Link copied to clipboard
Link copied to clipboard
open override fun clone(): Paint
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun replaceMatrix(m: Matrix): GradientPaint
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard