Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
interface CanvasRenderingContext2D
implements CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface
import { type CanvasRenderingContext2D } from "https://deno.land/x/yxz@0.32.0/typing/lib.dom.ts";

The CanvasRenderingContext2D interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a element. It is used for drawing shapes, text, images, and other objects.

Properties

readonly
canvas: HTMLCanvasElement

Methods

getContextAttributes(): CanvasRenderingContext2DSettings