ICanvas
Unofficial
Canvas interface for PixiJS rendering.
Import:
import type { ICanvas } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface ICanvas extends Partial<EventTarget>Extends: Partial<EventTarget>
Properties
| Property | Type | Description | |
|---|---|---|---|
| height | number | Canvas height. | |
| width | number | Canvas width. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| getContext(contextId, options?) | CanvasRenderingContext2D | null | Returns a 2D rendering context. | |
| getContext(contextId, options?) | null | WebGLRenderingContext | Returns a WebGL rendering context. | |
| getContext(contextId, options?) | null | WebGL2RenderingContext | Returns a WebGL2 rendering context. | |
| toBlob(callback, type?, quality?) | void | Converts the canvas to a blob. | |
| toDataURL(type?, quality?) | string | Converts the canvas to a data URL. |