I tried to make this happen with canvas\' globalCompositeOperation
, but had no luck so I\'m asking here. There are similar questions here, but I did not find my cas
Here’s how to composite your “roof pattern” on top of your “house” using “roofOverlay”
This is a multi-part process:
Here is a Fiddle that loads grass on your roof: http://jsfiddle.net/m1erickson/SWP6v/
And here is code that uses a lattice pattern fill on your roof:
Note: I'm assuming that you want the house and roof on separate canvases so you can flip through a variety of roof choices. If you need everything on 1 canvas, you can just draw the roof canvas onto the house canvas.