Class LinearGradient

Hierarchy (view full)

Implements

  • ColorProvider

Constructors

  • Parameters

    • point1: VectorLike

      The position of the first end point of the linear gradient.

    • point2: VectorLike

      The position of the second end point of the linear gradient.

    • stops: (Stop | [offset: number, color: string, opacity: number])[]

      A list of Stops that contain the gradient fill pattern for the gradient. The linear gradient lives within the space of the parent object's matrix space.

    • options: LinearGradientOptions = {}

    Returns LinearGradient

Properties

_change: Variable<LinearGradient> = ...
_flagStops: boolean = false
change$: Observable<LinearGradient> = ...
parent: unknown
zzz: ZZZ

Accessors

  • get id(): string
  • Returns string

  • set id(id): void
  • Parameters

    • id: string

    Returns void

Methods

  • Indicates to the ColorProvider that it is being used in one less fill or stroke property. The ColorProvider is expected to remove itself from the SVG defs element when no longer used.

    Type Parameters

    • T

    Parameters

    • viewDOM: ViewDOM<T>
    • defs: T

    Returns void

  • Indicates to the ColorProvider that it is being used in one more fill or stroke property. The ColorProvider is expected to add itself to the SVG defs element when being used.

    Type Parameters

    • T

    Parameters

    • viewDOM: ViewDOM<T>
    • defs: T

    Returns void

  • Provide the value that will be used in the fill or stroke attribute of the consuming element. Usually url(#${this.id}) for gradients and textures but may be e.g. an rgb() or #RRGGBB value.

    Returns string