lundi 9 mars 2015

How to recognize an area in an canvas via javascript

This image is loaded in an html5 canvas.


If a user presses at any point inside the square, I want to fill this area with a color. But just inside, the color stops at the black lines. You can think about the fill tool like in Windows Paint.


How can I solve this? Are there libraries for javascript for such a function to start with?


shape


Aucun commentaire:

Enregistrer un commentaire