Class

Gjsgjs/cairodefaultLinearGradient

A pattern for linear gradients

Hierarchy (View Summary)

Index

Constructors

Methods - Inherited from gjs/cairo.default.Gradient

Constructors

  • Creates a new linear gradient pattern

    Parameters

    • x0: number

      X coordinate of the start point

    • y0: number

      Y coordinate of the start point

    • x1: number

      X coordinate of the end point

    • y1: number

      Y coordinate of the end point

    Returns LinearGradient

Methods - Inherited from gjs/cairo.default.Gradient

  • Adds an opaque color stop to the gradient at the given offset

    Parameters

    • offset: number

      Offset position of the stop, between 0 and 1

    • red: number

      Red component, between 0 and 1

    • green: number

      Green component, between 0 and 1

    • blue: number

      Blue component, between 0 and 1

    Returns void

  • Adds a color stop to the gradient at the given offset

    Parameters

    • offset: number

      Offset position of the stop, between 0 and 1

    • red: number

      Red component, between 0 and 1

    • green: number

      Green component, between 0 and 1

    • blue: number

      Blue component, between 0 and 1

    • alpha: number

      Alpha component, between 0 and 1

    Returns void