-
• #2
I'm afraid that's what you'd expect - there's not enough memory to store a potentially huge offscreen image, so once you scroll off the screen, it's gone.
I guess there are two options:
- Scroll on drag, and redraw when the finger is lifted (that's what we do with OpenStreetMap and it seems like a good compromise)
- Allocate a large offscreen buffer (with Graphics.createArrayBuffer) or maybe store it on the SD card, and then render that image to the screen - this could still be pretty slow though.
- Scroll on drag, and redraw when the finger is lifted (that's what we do with OpenStreetMap and it seems like a good compromise)
-
• #3
ok good to know, thank you for the answer
Hi evereyone,
i currently try to create a scrolling, where i can scroll the screen up and down with my finger. I found the g.scroll(x,y) method, this however deletes every pixel that leaves the screen.
I tried to use the drag event to move the position of my objects to draw every time a drag event is being emitted. This however causes jumps between each render, if there are more objects that need a redraw.
Is there a way to have a smooth scrolling with many objects?
An code example with both scrolling methods. You can change the scroll method with the press of the hardware button.