Canvas ImageBitmap:ImageBitmap.close()方法

返回到:Canvas API:ImageBitmap

ImageBitmap.close() 方法处理与ImageBitmap.

语法

close()

参数

没有任何。

返回值

无(undefined)。

例子

const offscreen = new OffscreenCanvas(256, 256);
const gl = offscreen.getContext('webgl');

// Perform some drawing using the gl context

const bitmap = offscreen.transferToImageBitmap();
// ImageBitmap { width: 256, height: 256 }

bitmap.close();
// ImageBitmap { width: 0, height: 0 } — disposed

返回到:Canvas API:ImageBitmap

作者:terry,如若转载,请注明出处:https://www.web176.com/canvas_api/7855.html

(0)
打赏 支付宝 支付宝 微信 微信
terryterry
上一篇 2023年1月5日
下一篇 2023年1月5日

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注