I have a custom map as an image which I am loading in a html5 canvas. Here is sample image:
[![Sample image][1]][1]
I am looking to fill the background color of any room from this image based on some logic from javascript. I have another application from where I can get the x-axis and y-axis of a room(center of each room as position in px). Now what I am interested in is to fill a white background of room with some color from javascript same as we do in paintbursh(mac application). Here is what I am interesting in result: [![enter image description here][2]][2]
Can someone tell me is it possible using html canvas and how I can fill the certain part of a image in canvas from javascript.