Function createCanvasAnd2dContext

  • Creates a canvas and context with the given width and height.

    Parameters

    • id: string

      ID name of the canvas context.

    • width: number

      Width of the canvas context.

    • height: number

      Height of the canvas context.

    Returns CanvasAndContext

    An anonymous object with canvas, ctx, w and h properties.