brush opacity

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
Victor Seiji Hariki 2023-02-15 00:16:28 -03:00
parent 45f4412ab8
commit 3caacdb803

View file

@ -25,7 +25,12 @@ const _color_brush_erase_callback = (evn, state, ctx) => {
ctx.save();
ctx.strokeStyle = "black";
ctx.filter = "blur(" + state.brushBlur + "px)";
ctx.filter =
"blur(" +
state.brushBlur +
"px) opacity(" +
state.brushOpacity * 100 +
"%)";
ctx.lineWidth = state.brushSize;
ctx.beginPath();
ctx.moveTo(