title: Painting a area inside image with JSF
body: <p>I have a image with a lot of circles (without color). When user click in a specific circle, the application must ask the desired color and paint this circle with this color. </p>
  
  <p>My image is like that:</p>
  
  <p><img src="https://i.stack.imgur.com/HY4aX.gif" alt="enter image description here"></p>
  
  <p>So, I work with the following tecnologies: JSF (with Primefaces) + JPA + Maven + Spring  PostgreSQL. My initial solution is that: 
  <em>"Introduce the image in XHTML page (with  tag) and with  tag, map all circle's area. So when user click inside a mapped area, i will launch a javascript code to draw a image with specific color in this area (throught the circle). "</em></p>
  
  <p>I think this solution a bit difficult to implement and a lot of work, not because of map tag, but because the process to repaint the area with another color with a Javascript code. </p>
  
  <p>Exists some better solutions for this ? Maybe a API in JAVA or something more easy and productive ?</p>