ImageBitmapRenderingContext
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("Canvas API")}}{{AvailableInWorkers}}
The **ImageBitmapRenderingContext** interface is a canvas rendering context that provides the functionality to replace the canvas's contents with the given {{domxref("ImageBitmap")}}. Its context id (the first argument to {{domxref("HTMLCanvasElement.getContext()")}} or {{domxref("OffscreenCanvas.getContext()")}}) is "bitmaprenderer".
This interface is available in both the window and the worker context.
Instance properties
- {{domxref("ImageBitmapRenderingContext.canvas")}} {{ReadOnlyInline}}
- : A read-only reference to the {{domxref("HTMLCanvasElement")}} or {{domxref("OffscreenCanvas")}} object that is associated with the given context.
Instance methods
- {{domxref("ImageBitmapRenderingContext.transferFromImageBitmap()")}}
- : Displays the given
ImageBitmapin the canvas associated with this rendering context. Ownership of theImageBitmapis transferred to the canvas. This was previously namedtransferImageBitmap(), but was renamed in a spec change. The old name is being kept as an alias to avoid code breakage.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{domxref("OffscreenCanvas")}}