ImageBitmapRenderingContext
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年1月.
メモ: この機能はウェブワーカー内で利用可能です。
ImageBitmapRenderingContext インターフェイスは、キャンバスのレンダリングコンテキストで、指定された ImageBitmap でキャンバスのコンテンツを置き換える機能を提供します。そのコンテキスト ID(HTMLCanvasElement.getContext() または OffscreenCanvas.getContext() の最初の引数)は "bitmaprenderer" です。
このインターフェイスは、ウィンドウとワーカーコンテキストの両方で利用できます。
インスタンスメソッド
ImageBitmapRenderingContext.transferFromImageBitmap()-
指定された
ImageBitmapをこのレンダリングコンテキストに関連付けられたキャンバスで表示します。ImageBitmapの所有権はキャンバスに移譲されます。これは以前はtransferImageBitmap()という名前付きでしたが、仕様変更で名前が変更されました。古い名前はコードの破損を避けるために別名として残されています。
仕様書
| Specification |
|---|
| HTML> # the-imagebitmaprenderingcontext-interface> |
ブラウザーの互換性
Loading…