I am changing the TouchPaint.java which is provided with the Android SDK samples. Currently it supports the pixels drawing on the canvas by pressing & dragging the mouse, though its missing the pixels in drawing (Any Solution?).
Any way I want to change this in such a way that I could draw lines,rectangles or other shapes with mouse pointer dragging, like in normal paint brush applications. I tried to do it my self but faced following issues
- When I draw rectangles/lines with mouse drag, its not clearing the rectangles/lines which are keep drawing during mouse dragging (of course i tried to remove them but not successful yet). You can see it in the attached screen shot.
Required:
Kindly write some code in which some shape like line or rectangle could be drawn with the mouse pointer, i have attached my code.



