Class CanvasGradientItem
- java.lang.Object
-
- org.pepstock.charba.client.dom.elements.CanvasGradientItem
-
- All Implemented Interfaces:
IsCastable
@JsType(isNative=true, name="CanvasGradient", namespace="<global>") public final class CanvasGradientItem extends Object implements IsCastable
Represents an opaque object describing a gradient.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, anIllegalArgumentException
is raised.
If the color isnull
, the default color for line element is used.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, anIllegalArgumentException
is raised.
If the color isnull
, the default color for line element is used.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.dom.IsCastable
as
-
-
-
-
Method Detail
-
addColorStop
@JsOverlay public 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, anIllegalArgumentException
is raised.
If the color isnull
, the default color for line element is used. If the color can't be parsed as a CSS color, a SYNTAX_ERR is raised.- Parameters:
offset
- 0 and 1 value to define the offsetcolor
- the CSS color
-
addColorStop
@JsOverlay public 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, anIllegalArgumentException
is raised.
If the color isnull
, the default color for line element is used. If the color can't be parsed as a CSS color, a SYNTAX_ERR is raised.- Parameters:
offset
- 0 and 1 value to define the offsetcolor
- the CSS color
-
-