@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="OffscreenCanvas")
public class OffscreenCanvas
extends EventTarget
implements TexImageSource, Transferable
| Modifier and Type | Field and Description |
|---|---|
int |
height
The height property returns and sets the height of an OffscreenCanvas object.
|
int |
width
The width property returns and sets the width of an OffscreenCanvas object.
|
| Constructor and Description |
|---|
OffscreenCanvas(int width,
int height)
The OffscreenCanvas() constructor returns a newly instantiated OffscreenCanvas object.
|
| Modifier and Type | Method and Description |
|---|---|
Promise<Blob> |
convertToBlob()
The OffscreenCanvas.convertToBlob()method creates a Blob object representing the image contained in the canvas.
|
Promise<Blob> |
convertToBlob(ImageEncodeOptions options)
The OffscreenCanvas.convertToBlob()method creates a Blob object representing the image contained in the canvas.
|
OffscreenRenderingContext |
getContext(java.lang.String contextId)
The OffscreenCanvas.getContext() method returns a drawing context for an offscreen canvas, or null if the context identifier is not supported.
|
OffscreenRenderingContext |
getContext(java.lang.String contextId,
java.lang.Object options)
The OffscreenCanvas.getContext() method returns a drawing context for an offscreen canvas, or null if the context identifier is not supported.
|
ImageBitmap |
transferToImageBitmap()
The OffscreenCanvas.transferToImageBitmap() method creates an ImageBitmap object from the most recently rendered image of the OffscreenCanvas.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListenerpublic int height
public int width
public OffscreenCanvas(int width,
int height)
@Nonnull public Promise<Blob> convertToBlob(@Nonnull ImageEncodeOptions options)
@Nonnull public Promise<Blob> convertToBlob()
@Nullable public OffscreenRenderingContext getContext(@OffscreenRenderingContextId @Nonnull java.lang.String contextId, @Nullable java.lang.Object options)
@Nullable public OffscreenRenderingContext getContext(@OffscreenRenderingContextId @Nonnull java.lang.String contextId)
@Nonnull public ImageBitmap transferToImageBitmap()