Reputation: 1
How can i change fill color corners in fabric.js, but i'd like to have different color in border corners. i want to get somethinglike this:
Upvotes: 0
Views: 1269
Reputation: 939
Basically, what you need to do is this...
// create a rectangle with a fill and a different color stroke
var rect = new fabric.Rect({
left: 50,
top: 50,
width: 50,
height: 50,
fill: 'rgba(255,127,39,1)',
stroke: 'rgba(34,177,76,1)',
strokeWidth: 5
});
canvas.add(rect);
canvas.renderAll();
Here's a fiddle example
Upvotes: 1