GradientStop
The GradientStop object.
Constructors
GradientStop([color[, offset]])
Creates a GradientStop object.
Parameters:
color:
Color
— the color of the stop — optional, default:new Color(0, 0, 0)
offset:
Number
— the position of the stop on the gradient ramp as a value between0
and1
;null
orundefined
for automatic assignment. — optional, default:null
Returns:
GradientStop
Properties
offset
The ramp-point of the gradient stop as a value between
0
and1
.Type:
Number
Example:Animating a gradient's ramp points:
color
The color of the gradient stop.
Type:
Color
Example:Animating a gradient's ramp points:
Methods
clone()
Returns:
GradientStop
— a copy of the gradient-stop