Skip to content

Documentation / @ripl/canvas / getCanvasGradientBounds

Function: getCanvasGradientBounds()

getCanvasGradientBounds(box, width, height): GradientBounds

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

Resolves gradient bounds from a bounding box or falls back to context dimensions.

Parameters

ParameterType
boxBox | undefined
widthnumber
heightnumber

Returns

GradientBounds