interface HTMLCanvasElement
implements HTMLElement
import { type HTMLCanvasElement } from "https://deno.land/x/windmill@v1.361.1/node_modules/evt/src/lib/types/lib.dom.ts";
Provides properties and methods for manipulating the layout and presentation of elements. The HTMLCanvasElement interface also inherits the properties and methods of the HTMLElement interface.
Methods
getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): CanvasRenderingContext2D | null
Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null
getContext(contextId: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext | null
getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null
getContext(contextId: string, options?: any): RenderingContext | null
Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
transferControlToOffscreen(): OffscreenCanvas
addEventListener<K extends keyof HTMLElementEventMap>(): void
type: K,
listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof HTMLElementEventMap>(): void
type: K,
listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,