'How to allow users to draw only within a specified area in Android?
In my Android Project I have a drawView which user can draw.
And it draw a body shape by using x Coordinates, y Coordinates and Bitmap.setPixel.
A example of the body shape: https://ibb.co/KDNXhhX.
What I want to do is, that user can draw anywhere, but after the pen moved up(which means ACTION_UP), all the draw outside of the body would disapper. In other word, it only keep the draw inside the body.
I have checked the documentation about invalidate() from View, but it only invalidate a Rect or a drawable. How can I do this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
