@JsType(isNative=true, name="CanvasGradient", namespace="<global>") public final class CanvasGradientItem extends Object implements IsCastable
Modifier and Type | Method and Description |
---|---|
void |
addColorStop(double offset,
IsColor color)
Adds a new stop, defined by an offset and a color, to the gradient.
If the offset is not between 0 and 1, inclusive, an IllegalArgumentException is raised.If the color is null , the default color for line element is used. |
void |
addColorStop(double offset,
String color)
Adds a new stop, defined by an offset and a color, to the gradient.
If the offset is not between 0 and 1, inclusive, an IllegalArgumentException is raised.If the color is null , the default color for line element is used. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
as
@JsOverlay public void addColorStop(double offset, String color)
IllegalArgumentException
is raised.null
, the default color for line element is used. If the color can't be parsed as a CSS color, a SYNTAX_ERR is raised.offset
- 0 and 1 value to define the offsetcolor
- the CSS color@JsOverlay public void addColorStop(double offset, IsColor color)
IllegalArgumentException
is raised.null
, the default color for line element is used. If the color can't be parsed as a CSS color, a SYNTAX_ERR is raised.offset
- 0 and 1 value to define the offsetcolor
- the CSS color