fabricjs - Fabric.js how to set opacity of lines -
using fabric.js library, can set line width , color follows:
canvas.freedrawingbrush.width = 5; canvas.freedrawingbrush.color = "#f00"; is there way set opacity too? couldn't find in documentation, neither on net anywhere.
instead of using hexadecimal color code, can set color use rgba, below:
canvas.freedrawingbrush.color = 'rgba(255, 0, 0, 0.1)';
Comments
Post a Comment