Reputation: 2819
I'm trying to add pattern background to a png image that i have added into canvas. I used setPatternFill
method provided by fabric js. But it's not working.
How ever, when i tried to add pattern to a rectange, it worked.
So what am i doing wrong?
Here's the demo
Upvotes: 0
Views: 994
Reputation: 118
Referring to the issue on github (https://github.com/kangax/fabric.js/issues/2112), I think it is not possible yet because the author marked it as a possible feature. I needed the same functionality. So I thought to share with you what I found.
By the way I used the lirary canvas-masking to mask images. Here is the link https://github.com/codepo8/canvas-masking , in case anyone needs it.
Upvotes: 3