Skip to main content
Module

x/canvas/mod.ts>PictureRecorder

Canvas API for Deno, ported from canvaskit-wasm (Skia).
Latest
interface PictureRecorder
implements EmbindObject<PictureRecorder>
import { type PictureRecorder } from "https://deno.land/x/canvas@v1.4.1/mod.ts";

Methods

beginRecording(bounds: InputRect): Canvas

Returns a canvas on which to draw. When done drawing, call finishRecordingAsPicture()

finishRecordingAsPicture(): SkPicture

Returns the captured draw commands as a picture and invalidates the canvas returned earlier.