Class CanvasGradientItem
- java.lang.Object
- 
- org.pepstock.charba.client.dom.elements.CanvasGradientItem
 
- 
- All Implemented Interfaces:
- IsJSType,- IsCastable
 
 @JsType(isNative=true, name="CanvasGradient", namespace="<global>") public final class CanvasGradientItem extends Object implements IsCastableRepresents an opaque object describing a gradient.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddColorStop(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, anIllegalArgumentExceptionis raised.
 If the color isnull, the default color for line element is used.voidaddColorStop(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, anIllegalArgumentExceptionis raised.
 If the color isnull, the default color for line element is used.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.pepstock.charba.client.dom.IsCastableas
 
- 
 
- 
- 
- 
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, anIllegalArgumentExceptionis 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 offset
- color- 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, anIllegalArgumentExceptionis 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 offset
- color- the CSS color
 
 
- 
 
-