Function: renderToCanvas()
ts
function renderToCanvas<C>(
layout,
canvas,
options?
): Promise<C>;Draw a layout onto canvas, sizing it to the layout (width × pixelRatio) and loading its images first. Resolves to the canvas.
Type Parameters
| Type Parameter |
|---|
C extends CanvasLike |
Parameters
| Parameter | Type |
|---|---|
layout | Layout |
canvas | C |
options | RasterOptions |
Returns
Promise<C>