Radial Gradient fill style.

Instances of RadialGradientFill are immutable, meaning that its setters don't modify the object, but instead return a completely new modified object.

Hierarchy

  • RadialGradientFillStyleRecord
    • RadialGradientFill

Implements

Constructors

Properties

ditheringEnabled: boolean

Is dithering enabled.

The extent for gradient.

Defines where the gradient takes it's size.

fillType: "radial-gradient"
position: Point

Gradient center position.

A element relative coordinate. 0 to 1 coordinate space. { x: 0, y: 0 } is bottom left. { x: 1, y: 1 } is top right.

The shape for the gradient

stops: ColorStop[]

Gradient color stops

type: "fillstyle"

Methods

  • Get the fill sub type of the gradient.

    Returns boolean

  • Get the center position of the gradient.

    Returns Point

  • Set the fill sub type of the gradient. Default is true.

    All style object setter methods return a new object rather than modifying the current one.

    Parameters

    • enabled: boolean

    Returns RadialGradientFill

  • Set the center position of the gradient.

    All style object setter methods return a new object rather than modifying the current one.

    Parameters

    • position: Point

      Local XY coordinate in x: [0-1], y: [0-1] range

    Returns RadialGradientFill

  • Get CSS representation of the FillStyle.

    Returns string