January 2014
Intermediate to advanced
736 pages
70h 43m
English
The touchEnded method (Fig. 7.31) is called when the user lifts a finger from the screen. The method receives the ID of the finger (lineID) for which the touch just ended as an argument. Line 262 gets the corresponding Path. Line 263 calls the bitmapCanvas’s drawPath method to draw the Path on the Bitmap object named bitmap before we call Path’s reset method to clear the Path. Resetting the Path does not erase its corresponding painted line from the screen, because those lines have already been drawn to the bitmap that’s displayed to the screen. The lines that are currently being drawn by the user are displayed on top of that bitmap.
259 // called when the user finishes ...
Read now
Unlock full access