Class ImageBitmapRenderingContext
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The ImageBitmapRenderingContext interface is a canvas rendering context that provides the functionality to replace the canvas's contents with the given ImageBitmap. Its context id (the first argument to GetContext(string, dynamic) or GetContext(OffscreenRenderingContextId, dynamic)) is "bitmaprenderer".
[Value("ImageBitmapRenderingContext")]
public class ImageBitmapRenderingContext
- Inheritance
-
ImageBitmapRenderingContext
- Inherited Members
Remarks
This interface is available in both the window and the worker context.
Constructors
ImageBitmapRenderingContext()
public ImageBitmapRenderingContext()
Properties
Canvas
The ImageBitmapRenderingContext.canvas property, part of the
Canvas API, is a read-only reference to the
HTMLCanvasElement or OffscreenCanvas object that is associated with the given context.
[Value("canvas")]
public Union78 Canvas { get; }
Property Value
- Union78
A HTMLCanvasElement or OffscreenCanvas object.
Remarks
-ImageBitmapRenderingContext interface
-Canvas API
Methods
TransferFromImageBitmap(ImageBitmap?)
The ImageBitmapRenderingContext.transferFromImageBitmap()
method displays the given ImageBitmap in the canvas associated with this
rendering context. The ownership of the ImageBitmap is transferred to the
canvas as well.
[Value("transferFromImageBitmap")]
public GlobalObject.Undefined TransferFromImageBitmap(ImageBitmap? bitmap)
Parameters
bitmapImageBitmap
Returns
Remarks
This method was previously named transferImageBitmap(), but was renamed in
a spec change. The old name is being kept as an alias to avoid code breakage.
-The interface defining this method, ImageBitmapRenderingContext
-OffscreenCanvas
-TransferToImageBitmap()