Here you have a small example of basic drawing on an image.
The program doesn't memorize nor save the x,y coordinates of the different points. It's a small version of this drawing program: http://www.b4x.com/forum/share-your-creations/3945-draw-program-5.html
It's not that difficult to memorize the coordinates in arrays and save them. But you must not only memorize the x,y, coordinates but you must also memorise between what points you have a line.