ImageBitmapRenderingContext Class
The rendering context of a canvas that displays image bitmaps (https://html.spec.whatwg.org/multipage/canvas.html#the-imagebitmaprenderingcontext-interface): canvas.getContext("bitmaprenderer"). Its output bitmap is the bitmap of the canvas: the bitmaps given to ImageBitmapRenderingContext.TransferFromImageBitmap are displayed without copy.
public sealed class ImageBitmapRenderingContextProperties
| Name | Description |
|---|---|
| Canvas | Gets the canvas of the context: an HtmlCanvasElement or an OffscreenCanvas. |
Gets the canvas of the context: an HtmlCanvasElement or an OffscreenCanvas.
public object Canvas { get; }Methods
| Name | Description |
|---|---|
| TransferFromImageBitmap(ImageBitmap?) | Displays a bitmap in the canvas (https://html.spec.whatwg.org/multipage/canvas.html#dom-imagebitmaprenderingcontext-transferfromimagebitmap): the bitmap is detached (its data is now the bitmap of the canvas), or the canvas is cleared when it is null. |
TransferFromImageBitmap(ImageBitmap?)
ImageBitmapRenderingContext.csDisplays a bitmap in the canvas (https://html.spec.whatwg.org/multipage/canvas.html#dom-imagebitmaprenderingcontext-transferfromimagebitmap): the bitmap is detached (its data is now the bitmap of the canvas), or the canvas is cleared when it is null.
public void TransferFromImageBitmap(ImageBitmap? bitmap)Parameters
bitmapImageBitmap?- The bitmap, or null.
Exceptions
DomException- An
InvalidStateErrorwhen the bitmap is detached.