• Yes, you'd have to reassemble your module, but the Graphics.setRotation command will let you rotate the graphics object so that you can draw in the orientation you want to.

    That'd definitely be the fastest/easiest.

    If you're totally set on remapping using your method, I'd suggest using the Graphics lib, but to remap the flat image to the 3 panels.

    var leds = Graphics.createArrayBuffer(12,4,24);
    // flip...
    var img = {width:12,height:4,bpp:24,buffer:leds.bu­ffer};
    var ledbuffer = new Uint8Array(12*4*3);
    var dst = Graphics.createArrayBuffer(4,4,24,{zigza­g:true});
    var panelSize = 4*4*3;
    ledbuffer.set(new Uint8Array(dst.buffer),0);
    ledbuffer.set(new Uint8Array(dst.buffer),panelSize);
    ledbuffer.set(new Uint8Array(dst.buffer),panelSize*2);

    Not tested, but something like that should work fine.

    It's a bit fiddly, but would be way nicer/more efficient if you were working with much bigger panels.


Avatar for Gordon @Gordon started