Need to insert image to fabric js and make rounded borders to it. (NOT to whole canvas) Read answer here:
Fabric.js Clip Canvas (or object group) To Polygon
But i can't reproduce clipping as that guy made.
var clip = canvas.item(0);
var obj = canvas.item(1);
canvas.remove(clip);
obj.clipTo = function(ctx) {
clip.render(ctx);
};
Tried to make svg rectange and clip image to it: http://jsfiddle.net/ZxYCP/657/
I'm getting unexpected behavior...