RadialGradient
classin packageklyn.gui.windows
public class RadialGradient extends Gradient
└ RadialGradient

Radial gradient compatible with a canvas-style API.

Colors follow the circles interpolated between (x0, y0, r0) and (x1, y1, r1). The first/last stop extends beyond its offset wherever a non-negative-radius circle exists. Identical circles paint nothing. Painter transforms apply to the entire gradient, including both radii.

gradient = RadialGradient(80, 80, 4, 80, 80, 70)
gradient.addStop(0.0, Color.white())
gradient.addStop(1.0, Color(15, 23, 42, 1.0))
Properties
Modifier and Type Member Description
public property r0
r0 as Int
Non-negative start-circle radius.
public property r1
r1 as Int
Non-negative end-circle radius; it may be smaller than r0.
public property x0
x0 as Int
Inner circle center X.
public property x1
x1 as Int
Outer circle center X.
public property y0
y0 as Int
Inner circle center Y.
public property y1
y1 as Int
Outer circle center Y.
Constructors
Modifier and Type Member Description
public RadialGradient
RadialGradient(x0 as Int = 0, y0 as Int = 0, r0 as Int = 0, x1 as Int = 0, y1 as Int = 0, r1 as Int = 0)
Creates a two-circle radial gradient without color stops.
Methods
Modifier and Type Member Description
public override kind
kind() as String
No summary.
Inherited Methods
methodInherited Methods from Gradient: addStop, clearStops, kind, setColorAt, stops, stopsDescription, toString