Class ObnizUtil

Hierarchy

  • ObnizUtil

Constructors

Properties

createCanvas: any
height: any
obniz: any
width: any

Methods

  • This creates a Canvas context. It will add a canvas dom to body(in html).

    // Example
    const ctx = obniz.util.createCanvasContext(128, 64);
    ctx.font = "9px sans-serif";
    ctx.fillText('Hello', 0, 7);

    Parameters

    • width: number
    • height: number

    Returns any

  • convert from data array to string

    Parameters

    • data: number[] | Uint8Array

    Returns null | string

Generated using TypeDoc