search

goog.graphics.LinearGradient

Provided By
Extends
warning Deprecated

goog.graphics is deprecated. It existed to abstract over browser differences before the canvas tag was widely supported. See http://en.wikipedia.org/wiki/Canvas_element for details.

Creates an immutable linear gradient fill object.

new LinearGradient( x1, y1, x2, y2, color1, color2, opt_opacity1, opt_opacity2 )

Parameters
x1number

Start X position of the gradient.

y1number

Start Y position of the gradient.

x2number

End X position of the gradient.

y2number

End Y position of the gradient.

color1string

Start color of the gradient.

color2string

End color of the gradient.

opt_opacity1(number|null)=

Start opacity of the gradient, both or neither of opt_opacity1 and opt_opacity2 have to be set.

opt_opacity2(number|null)=

End opacity of the gradient.

Instance Methods