Paints one pane's series. One instance per pane: a backend holds a context on that pane's base canvas, and contexts do not travel between canvases.

Implements

Constructors

Properties

kind: "canvas2d" = 'canvas2d'

Methods

  • Take the pane's base data canvas. ctx2d is the 2D context the pane already holds on it, when it holds one: the canvas-2D backend draws on exactly that object, so a frame is one context's op stream and not two contexts' interleaved. A backend that owns the canvas outright ignores it.

    Parameters

    • canvas: HTMLCanvasElement
    • ctx2d: null | CanvasRenderingContext2D

    Returns void

  • A 2D context for what the backend does not draw natively (grid, axes, primitives), or null when the backend paints those itself.

    Returns null | CanvasRenderingContext2D

  • Nothing to do: the pane's CanvasLayer owns the backing store and sized it already. Re-sizing it here would clear a bitmap that was just painted.

    Parameters

    • _widthPx: number
    • _heightPx: number
    • _dpr: number

    Returns void