createRadialGradient method

Returns an object that represents a radial or circular gradient to use in a canvas context.

HTML Canvas 2D Context, Section 5Internet Explorer 9

Syntax


ICanvasGradient retVal = object.createRadialGradient(x0, y0, r0, x1, y1, r1);

Parameters

x0 [in]

Type: number

The x-coordinate of the starting circle of the gradient.

y0 [in]

Type: number

The y-coordinate of the starting circle of the gradient.

r0 [in]

Type: number

The radius of the starting circle.

x1 [in]

Type: number

The x-coordinate of the ending circle of the gradient.

y1 [in]

Type: number

The y-coordinate of the ending circle of the gradient.

r1 [in]

Type: number

The radius of the ending circle.

Standards information

Remarks

You can use radial gradients together with the ICanvasRenderingContext2D::fillText or ICanvasRenderingContext2D::fillRect method. The following illustration uses ICanvasRenderingContext2D::fillRect.

Illustration of the radial gradient object example

 

 

Community Additions

ADD
Show:
© 2014 Microsoft