MCPcopy Index your code
hub / github.com/bqplot/bqplot / upload_png

Method upload_png

js/src/Figure.ts:1382–1394  ·  view source on GitHub ↗
(model, scale)

Source from the content-addressed store, hash-verified

1380 }
1381
1382 async upload_png(model, scale) {
1383 const canvas = await this.get_rendered_canvas(scale);
1384 canvas.toBlob(async (blob) => {
1385 const buff = await blob.arrayBuffer();
1386 model.send(
1387 {
1388 event: 'upload_png',
1389 },
1390 null,
1391 [buff]
1392 );
1393 });
1394 }
1395
1396 async upload_svg(model) {
1397 const svg_string = await this.get_svg();

Callers

nothing calls this directly

Calls 2

get_rendered_canvasMethod · 0.95
sendMethod · 0.80

Tested by

no test coverage detected