Class CanvasUtils

Contains utils to handle canvas element manipulation and common canvas operations.

Constructors

Methods

  • Create a offscreen canvas, used to draw content that will not be displayed using DOM.

    If OffscreenCanvas object is no available creates a regular DOM canvas object instead.

    Parameters

    • width: number

      Width of the canvas in pixels.

    • height: number

      Height of the canvas in pixels.

    Returns HTMLCanvasElement | OffscreenCanvas