Gradient
The Gradient object.
Example:Applying a linear gradient color containing evenly distributed color stops:
Example:Create a circle shaped path at the center of the view, using 40% of the height of the view as its radius and fill it with a radial gradient color:
Properties
stops
The gradient stops on the gradient ramp.
Type:
Array of
GradientStop
objects
radial
Specifies whether the gradient is radial or linear.
Type:
Boolean
Methods
clone()
Returns:
Gradient
— a copy of the gradient
equals(gradient)
Checks whether the gradient is equal to the supplied gradient.
Parameters:
gradient:
Gradient
Returns:
Boolean
—true
if they are equal,false
otherwise