From 3caacdb803110767cf9485c6d9e5ecc947a01880 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Wed, 15 Feb 2023 00:16:28 -0300 Subject: [PATCH] brush opacity Signed-off-by: Victor Seiji Hariki --- js/ui/tool/colorbrush.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/ui/tool/colorbrush.js b/js/ui/tool/colorbrush.js index 6855a9e..c740aed 100644 --- a/js/ui/tool/colorbrush.js +++ b/js/ui/tool/colorbrush.js @@ -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(