Handles HTMLCanvasElements (or other drawing surfaces if being used) used to display the editor's contents.

Example

const editor = new Editor(document.body);
const w = editor.display.width;
const h = editor.display.height;
const center = Vec2.of(w / 2, h / 2);
const colorAtCenter = editor.display.getColorAt(center);

Accessors

  • get width(): number
  • Returns number

    the visible width of the display (e.g. how much space the display's element takes up in the x direction in the DOM).

Methods

  • Re-renders the contents of the wetInkRenderer onto the dryInkRenderer.

    Returns void

  • Parameters

    Returns null | Color4

    the color at the given point on the dry ink renderer, or null if screenPos is not on the display.

  • Rerenders the text-based display. The text-based display is intended for screen readers and can be navigated to by pressing tab.

    Returns void

  • If draftMode, the dry ink renderer is configured to render low-quality output.

    Parameters

    • draftMode: boolean

    Returns void

Generated using TypeDoc

OpenSource licenses