Linear Gradient fill style.

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

Hierarchy

  • LinearGradientFillStyleRecord
    • LinearGradientFill

Implements

Constructors

Properties

angle: number

Gradient angle in degrees

stops: ColorStop[]

Gradient Color stops

type: "fillstyle" = 'fillstyle'

Methods

  • Get the angle of the gradient line in degrees or radians.

    Parameters

    • Optional isRadians: boolean

      Pass true if radians is wanted.

    Returns number

  • Set the angle of the gradient line in degrees or radians.

    Parameters

    • angle: number

      Angle in degrees or radians. 0 degrees/radians is up. Clockwise rotation.

    • Optional isRadians: boolean

      Pass true if the angle provided is in radians.

    Returns LinearGradientFill