Share via


createLinearGradient method

Creates an object that represents a linear gradient to use in a canvas context.

 

Syntax

ICanvasGradient retVal = object.createLinearGradient(x0, y0, x1, y1);

Parameters

  • x0 [in]
    Type: number

    The x-coordinate, in pixels, of the start point of the gradient.

  • y0 [in]
    Type: number

    The y-coordinate, in pixels, of the start point of the gradient.

  • x1 [in]
    Type: number

    The x-coordinate, in pixels, of the end point of the gradient.

  • y1 [in]
    Type: number

    The y-coordinate, in pixels, of the end point of the gradient.

Standards information