I m developing an application which is very simple function:
There is 3 image.
1. top image
2. hidden image
3. "eraser" image
The function of the app goes like this, the top image covers the hidden image initially, and the eraser image is on top of the top image. User will be able to move the eraser image, and as the eraser moves, the top image is "erased" and the hidden image below will be revealed accordingly to the path of the eraser movement (just like wiping snow off the window will review the world outside).
And i implemented this application but application is too laggy and sometimes it skip some pixels without sweeping.
This is how i am sweeping the image .
- Code: Select all
nBitmap.getPixels(q, 0, eWidth, xpos, ypos, eWidth, eHeight) ;
mBitmap.setPixels(q, 0, eWidth, xpos, ypos, eWidth, eHeight) ;
i am updating xpos and ypos from onTouchEvent.