API

Interface ICanvas

Class used to abstract a canvas

interface ICanvas {
    height: number;
    width: number;
    getContext(
        contextType: string,
        contextAttributes?: any,
    ): ICanvasRenderingContext;
    remove?(): void;
    toDataURL(mime: string): string;
}
Index
height: number

Canvas height.

width: number

Canvas width.

  • returns a data URI containing a representation of the image in the format specified by the type parameter.

    Parameters

    • mime: string

      the image format.

    Returns string

    string containing the requested data URI.