Modifier and Type | Method and Description |
---|---|
static ArrayGradient |
fromOrEmpty(CanvasGradientItem... items)
This method creates new array instance with a variable number of
CanvasGradientItem arguments. |
static ArrayGradient |
fromOrEmpty(List<CanvasGradientItem> items)
Creates a java script array of gradients starting from list of gradients.
|
static ArrayGradient |
fromOrNull(CanvasGradientItem... items)
This method creates new array instance with a variable number of
CanvasGradientItem arguments. |
static ArrayGradient |
fromOrNull(List<CanvasGradientItem> items)
Creates a java script array of gradients starting from list of gradients.
|
CanvasGradientItem |
get(int index)
Gets the value at a given index.
|
@JsOverlay public static ArrayGradient fromOrNull(CanvasGradientItem... items)
CanvasGradientItem
arguments.items
- canvasPattern items to create new arraynull
if argument is null
or length to 0@JsOverlay public static ArrayGradient fromOrEmpty(CanvasGradientItem... items)
CanvasGradientItem
arguments.items
- canvasPattern items to create new arraynull
or length to 0@JsOverlay public static ArrayGradient fromOrNull(List<CanvasGradientItem> items)
items
- list of gradients to load in the new java script array.null
if argument is null
or empty@JsOverlay public static ArrayGradient fromOrEmpty(List<CanvasGradientItem> items)
items
- list of gradients to load in the new java script array.null
or empty@JsOverlay public CanvasGradientItem get(int index)
index
- the index to be retrieved