You are reading a single comment by @Sir_Indy and its replies. Click here to read the full conversation.
  • Hi All,

    How can I position an image so the top-left point is off the screen, i.e. the x and y coordinate are negative? (Bangle.js2, possibly linked to this question which now seems locked?)

    OR

    How can I display only part of an image? Crop an image in memory and display it?

    As part of my Overlay Notifications project, I'm making images and showing them on the overlay using Bangle.setLCDOverlay(img, x, y);. But x and y must be integers, so I can't scroll my image up by setting y as negative. Scrolling down works (by setting y to >0), the bottom of the image drops off the bottom of the screen.

    img.scroll doesn't work, again x and y must be integers, setting them negative goes bananas and crashes the watch. I also tried 'blit', but that reads screen pixels (I think) so also doesn't work for me. This would also apply to g.drawImage(image, x, y) and g.drawString(str, x, y), x and y must be integers.

    Thank you!

About

Avatar for Sir_Indy @Sir_Indy started