public final class Gradient
Package :
(default package)
Description :
A custom Gradient class.
Methods :
public final new(gradientType, colors, alphas, ratios, p1, p2, static, radius1, radius2)
Creates a new public final Gradient object.
Parameters :
- gradientType : The type (found in GradientType).
- colors : The Array of colors to use.
- alphas : The Array of alphas to use.
- ratios : The Array of ratios to use [0-1].
- p1 : The gradient's starting point.
- p2 : The gradient's ending point.
- static : Whether the gradient should be cached (true is always better).
- radius1 : If radial, the starting radius.
- radius2 : If radial, the ending radius.
public getContextGradient(ctx)
Getting the canvas gradient
Parameters :
- ctx : The context on which creating the gradient.
Returns :
The context's gradient.