Skip to content

Documentation / @ripl/canvas / canvasDrawImage

Function: canvasDrawImage()

canvasDrawImage(ctx, image, x, y, width?, height?): void

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

Draws an image onto a canvas context with optional width and height.

Parameters

ParameterType
ctxCanvasRenderingContext2D
imageCanvasImageSource
xnumber
ynumber
width?number
height?number

Returns

void