Canvas API:ImageBitmapRenderingContext

ImageBitmapRenderingContext 接口是 canvas 的渲染上下文,它只提供了使用给定 ImageBitmap 替换 canvas 的功能。它的上下文 ID (HTMLCanvasElement.getContext()OffscreenCanvas.getContext() (en-US) 的第一个参数) 是 "bitmaprenderer"

这个接口可用于 window context 和 worker context。

方法

ImageBitmapRenderingContext.transferFromImageBitmap()

在与此渲染上下文相关的 canvas 中显示给定的 ImageBitmapImageBitmap 的所有权被转移到画布上。这个函数以前命名为transferImageBitmap(),但在规范中修改了原名字。为了避免影响之前的代码,旧名称作为别名被保留下来。

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

(0)
打赏 支付宝 支付宝 微信 微信
terryterry
上一篇 2022年12月15日 下午2:46
下一篇 2022年12月15日 下午3:27

相关推荐

发表回复

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