I have mask image like this
How can I hide drawn elements by this mask like in photoshop (dark areas are invisible, transparent areas are shown).
It is possible to do this in raw canvas via setting globalCompositeOperation = 'destination-over'
, but I want it in Kineticjs
2
Answers
As of my knowledge you can try by using opacity: 0. for your image value. or create a rectangle overlap the rectangle over your image.
You can do something like this:
Demo: http://jsbin.com/nebuvi/1/edit?html,js,output