Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "index"

Index

Functions

Functions

Const adaptDPI

  • adaptDPI(canvas: HTMLCanvasElement, width: number, height: number): number
  • Sets the canvas size to given width & height and adjusts style to compensate for HDPI devices. Note: For 2D canvases, this will automatically clear any prior canvas content.

    Parameters

    • canvas: HTMLCanvasElement

      -

    • width: number

      uncompensated pixel width

    • height: number

      uncompensated pixel height

    Returns number

Generated using TypeDoc