• So using g as a global var is fine, that's what I do at the moment.

    I'd say passing it in as an argument is more flexible...

    require("my_lib").drawBarCode(g, myData);
    

    Then you have the option of drawing offscreen if you need.

    like this?

    I'd suggest: map = atob("DSdyGTNmExtsPSFCIx1cMTlOLwVQOxFENw­lICxd0") then map.charCodeAt(index). You could use E.toUint8Array to avoid the charCodeAt but for smaller arrays like this, I guess charCodeAt is more efficient.

About

Avatar for Gordon @Gordon started