You are reading a single comment by @Sir_Indy and its replies. Click here to read the full conversation.
  • Thank you Ganble, you're right it's not an issue with integers! You can probably tell I'm only a very amateur programmer!

    In that case, setLCDOverlay doesn't work with negative numbers, but this time I have no idea why.

    An example run in the emulator (same results on watch):

    img = Graphics.createArrayBuffer(100, 100, 8).setColor('#f00').fillRect(0, 0, 100, 100);
    var y = 0;
    Bangle.setLCDOverlay(img, 0, y);
    

    Draw a 100px square, colour it red, display in on the overlay. Negative number doesn't work, see third screenshot of blank screen.

    By contrast, g.drawImage(img, 0, y); does work with negative numbers! See screenshot with green square, drawn at y=-90.

    Sorry, didn't do enough experimenting with the basic drawImage call, not I only need to work out why setLCDOverlay doesn't work the same.


    4 Attachments

    • download.png
    • download.png
    • download.png
    • drawImage_y=-90.png
About

Avatar for Sir_Indy @Sir_Indy started