New to Kendo UI for AngularStart a free 30-day trial

Represents a linear color gradient (see example).

Definition

Package:@progress/kendo-drawing

Methods

Adds a color stop to the gradient.

The color can be in any of the following formats:

| Format | Description | --- | --- | --- | red | The basic or extended CSS color name | #ff0000 | The Hex RGB value | rgb(255, 0, 0) | The RGB value

Specifying 'none', 'transparent', or ' ' (an empty string) clears the fill.

Parameters:offsetnumber

The stop offset from the start of the element. Ranges from zero (the start of the gradient) to one (the end of the gradient).

colorstring

The color of the stop.

opacitynumber

The fill opacity. Ranges from zero (completely transparent) to one (completely opaque).

Returns:

GradientStop

  • The new gradient color stop.

Gets the end point of the gradient.

Returns:

Point

  • The current end point of the gradient.

Sets the end point of the gradient. The end point of the gradient. Coordinates are relative to the shape bounding box. For example, [0, 0] is top left and [1, 1] is bottom right.

Parameters:endPoint | number[]

The end point of the gradient.

Removes a color stop from the gradient.

Parameters:stopGradientStop

The gradient color stop to remove.

Gets the start point of the gradient.

Returns:

Point

  • The current start point of the gradient.

Sets the start point of the gradient. The start point of the gradient. Coordinates are relative to the shape bounding box. For example, [0, 0] is top left and [1, 1] is bottom right.

Parameters:startPoint | number[]

The end point of the gradient.

Properties

The configuration of this linear gradient.

The color stops of the gradient.