Hi
I have started on my first app in b4a and am just looking for some guidance towards the best way to achieve graphics drawing whilst maintaining good performance. I am new to both b4a and Android devices so I have no reference point...
My first app (just for fun & for learning) is simple kids drawing app that has a bitmap for the background which can be drawn to in various ways as the screen is touched. In a simplest case, I just want to capture the user's touches on the screen and then draw or move them. I know this is running on a mobile device but I can't get much above 10 frames per second so far and feel like I'm missing something :BangHead: I've tried it in the emulator (which would obviously be slow) but also on an HTC Wildfire but they are both similar in speed...
I can't access my code at the mo but in essence I'm doing this:
Activity Create
Create a mutable bitmap to draw with.
Create canvas for that bitmap
Create a canvas for the Activity
Activity Touch
Add new points to draw to a 'master list'
Timer (Interval set to 1ms)
Loop through the master list and draw all of the points to the offscreen bitmap.
Update the screen by drawing the offscreen bitmap to it
This is surprisingly slow even with just a couple of points to draw using Canvas.SetPixel.
If someone can suggest the best technique for doing this or common pitfalls to avoid I'd be most grateful
Cheers