Class LinearGradient

x, y, x2, y2 are all percent from 0 to 1 when globalCoord is false

Hierarchy

  • default
    • LinearGradient

Constructors

Properties

Methods

Constructors

  • Parameters

    • x: number
    • y: number
    • x2: number
    • y2: number
    • Optional colorStops: GradientColorStop[]
    • Optional globalCoord: boolean

    Returns LinearGradient

Properties

colorStops: GradientColorStop[]
global: boolean
id?: number
type: "linear"
x: number
x2: number
y: number
y2: number

Methods

  • Parameters

    • offset: number
    • color: string

    Returns void