Skip to content

Documentation / @ripl/canvas / toCanvasGradient

Function: toCanvasGradient()

toCanvasGradient(context, gradient, bounds): CanvasGradient

Defined in: canvas/src/helpers.ts:72

Converts a parsed gradient definition into a native CanvasGradient within the given bounds.

Parameters

ParameterType
contextCanvasRenderingContext2D
gradientGradient
boundsGradientBounds

Returns

CanvasGradient