From 2c73dd5d764dfb5e1c36802a71cf6910ac1ce37a Mon Sep 17 00:00:00 2001 From: Vilius Date: Sun, 29 Jul 2018 23:28:14 +0300 Subject: [PATCH] anti-aliasing improvements on fill and magic wand tools --- src/js/tools/fill.js | 4 +--- src/js/tools/magic_wand.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/js/tools/fill.js b/src/js/tools/fill.js index ae645706..a7edb765 100644 --- a/src/js/tools/fill.js +++ b/src/js/tools/fill.js @@ -201,9 +201,7 @@ class Fill_class extends Base_tools_class { ctxTemp.putImageData(img_tmp, 0, 0); if (anti_aliasing == true) { - context.shadowColor = "rgba(" + color_to.r + ", " + color_to.g + ", " - + color_to.b + ", " + color_to.a / 255 + ")"; - context.shadowBlur = 5; + context.filter = 'blur(1px)'; } context.drawImage(canvasTemp, 0, 0); } diff --git a/src/js/tools/magic_wand.js b/src/js/tools/magic_wand.js index 096abee1..b0ca00c9 100644 --- a/src/js/tools/magic_wand.js +++ b/src/js/tools/magic_wand.js @@ -188,7 +188,7 @@ class Magic_wand_class extends Base_tools_class { ctxTemp.putImageData(img_tmp, 0, 0); context.globalCompositeOperation = "destination-out"; if (anti_aliasing == true) { - context.filter = 'blur(2px)'; + context.filter = 'blur(1px)'; } context.drawImage(canvasTemp, 0, 0); }