Methods

add(position, color, alpha)

Add a gradient stop.

Parameters

Name Type Optional Description

position

DoubleValue

 

The position of the stop,in unit of percentage.

color

ColorValue

 

The color of the stop.

alpha

 

 

The alpha of the color.

clear()

Removes all elements from collection.

get(index) → GradientStop

Gets the gradient stop by the index.

Parameter

Name Type Optional Description

index

Number

 

The index.

Returns

GradientStop The gradient stop.

getCount()

Gets the number of elements actually contained in the collection.

isExist(index) → boolean

Is exist item in the collection.

Parameter

Name Type Optional Description

index

Number

 

index of element.

Returns

boolean 

iterator() → Iterator

Supports a simple iteration over a nongeneric collection.

Returns

Iterator 

set(index) → GradientStop

Gets the gradient stop by the index.

Parameter

Name Type Optional Description

index

Number

 

The index.

Returns

GradientStop The gradient stop.