canvaskit-wasm 0.39 build 2026-04-29

PictureRecorder

The thing that makes a Picture. beginRecording(bounds) returns a recording Canvas you draw into; finishRecordingAsPicture() returns the resulting Picture. The recorder itself can be deleted once the picture is captured.

PictureRecorder is a WASM object — .delete() when done.

const recorder = new CK.PictureRecorder();
const recCanvas = recorder.beginRecording(CK.LTRBRect(0, 0, 200, 200));
// ... draw into recCanvas ...
const pic = recorder.finishRecordingAsPicture();
recorder.delete();
// pic.delete() when finally done.

Members

MemberArgsReturnsNotes
beginRecordingbounds: RectCanvasStart recording. bounds hints at the maximum draw extent for optimization.
deletevoidFree the WASM memory.
finishRecordingAsPicturePictureStop recording and return the picture. Caller deletes the picture.

See also