GradientStopCollection

GradientStopCollection class

Represents the gradient stop collection.

class GradientStopCollection;

Methods

MethodDescription
get(number)Gets the gradient stop by the index.
set(GradientStop, number)Gets the gradient stop by the index.
add(number, CellsColor, number)Add a gradient stop.
add(number, Color, number)Add a gradient stop.
getCount()Gets the number of elements contained in.

get(number)

Gets the gradient stop by the index.

get(index: number) : GradientStop;

Parameters:

ParameterTypeDescription
indexnumberThe index.

Returns

The gradient stop.

set(GradientStop, number)

Gets the gradient stop by the index.

set(value: GradientStop, index: number) : void;

Parameters:

ParameterTypeDescription
valueGradientStopThe value to set.
indexnumberThe index.

Returns

The gradient stop.

add(number, CellsColor, number)

Add a gradient stop.

add(position: number, color: CellsColor, alpha: number) : void;

Parameters:

ParameterTypeDescription
positionnumberThe position of the stop,in unit of percentage.
colorCellsColorThe color of the stop.
alphanumberThe alpha of the color.

add(number, Color, number)

Add a gradient stop.

add(position: number, color: Color, alpha: number) : void;

Parameters:

ParameterTypeDescription
positionnumberThe position of the stop,in unit of percentage.
colorColorThe color of the stop.
alphanumberThe alpha of the color.

getCount()

Gets the number of elements contained in.

getCount() : number;