I want to make an app for children that when they start touching the screen, the background image appears under their finger. Means lets suppose we have a white screen, then you start touching the screen, wherever you touch the background image appears only on that areas. just like layer masking.
Sincerely yours,
Peyman Mortazavi
There are many way to achieve this. Since you tagged
monoon your question I’ll assume you’re interested in a way that’s easy to port to other graphical toolkits.Create and show your background image;
Create and show (over the background) a second image (identical size) that is pure white with an alpha channel (opaque);
When you get touch events simply set the second image alpha to transparent (e.g. a circle at the touched position with a radius roughly the size of child finger) and the background image will appear behind it;
As an alternative you could gradually reduce from opaque to transparent (in #3) so it would take a few swipes to get a totally clear image.