Table of Contents

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.

-OffscreenCanvas

See also on MDN

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

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

bitmap ImageBitmap

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

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()

See also on MDN