Render onto an HTMLCanvasElement using a CanvasRenderingContext2D

Hierarchy

Constructors

Properties

The canvas

The rendering context for the canvas

defaultRenderAs: Color = ...

Default color is solid black

imageData: ImageData

The last known image data from ctx

renderInfo: Color[] = []

Ordered by ID, the renderAs info for each element.

Methods

  • In addition to calling modifyElement, this leftpads colors with 255 and checks for dupicates.

    Returns

    the actual color of the element. Always 4 long.

    Parameters

    • id: number

      Id of element

    • newRenderAs: Color

      The proposed color of the element.

    Returns Color

Generated using TypeDoc