LinearGradient¶
Overview¶
A linear gradient that can be passed into the 'fill' or 'stroke' parameters.
SVG gradients, see http://www.w3.org/TR/SVG/pservers.html
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class LinearGradient¶
Constructor¶
new LinearGradient( x0 : number, y0 : number, x1 : number, y1 : number )¶
Instance Methods¶
createCanvasGradient() : CanvasGradient¶
Returns a fresh gradient given the starting parameters
createSVGPaint( svgBlock : SVGBlock ) : SVGLinearGradient¶
Creates an SVG paint object for creating/updating the SVG equivalent definition.
toString() : string¶
Returns a string form of this object
Instance Properties¶
start : Vector2¶
end : Vector2¶
isLinearGradient : boolean¶
Source Code¶
See the source for LinearGradient.ts in the scenery repository.