Fabric JS: Line drawing with borders

539 views Asked by At

Is it possible to draw a line with borders in fabric JS? I'm looking to draw a line with the only stroke value and I want the fill to remain white so that it looks like a line with borders. As far I referred the documentation I guess it's not possible fabricJS, Is there any alternative to achieve that requirement using fabricJS. http://jsfiddle.net/fy6b2rso/1/

var newLine = new fabric.Line([400,100,150,300],{
        stroke: "#000000",
        strokeWidth: 11,
});

var canvas = new fabric.Canvas('c');
canvas.add(newLine);
canvas.renderAll();

enter image description here

0

There are 0 answers