import { type HTMLCanvasElement } from "https://deno.land/x/evt@v2.4.19/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.
Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
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,