From ebb6d74d9f27b328189f3e71bca24de119771158 Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Mon, 2 Nov 2020 20:07:31 +0200 Subject: [PATCH] Using the lighten/darken on pixels with an alpha value of 0 no longer has an effect on them. --- CHANGELOG.md | 1 + src/Tools/LightenDarken.gd | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be5199d..1f7210e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ PinyaColada, Rémi Verschelde (akien-mga), dasimonde - Fixed "Export" option in the File menu not working properly and not remembering the directory path and file name when switching between projects (tabs). - Fixed Chinese and Korean characters not displaying properly in the Splash dialog and the About dialog. - Fixed crash when importing an incorrectly formatted GIMP Color Palette file. ([#363](https://github.com/Orama-Interactive/Pixelorama/issues/363)) +- Using the lighten/darken on pixels with an alpha value of 0 no longer has an effect on them.

## [v0.8.1] - 2020-10-14 diff --git a/src/Tools/LightenDarken.gd b/src/Tools/LightenDarken.gd index 3f54b48..262dc7f 100644 --- a/src/Tools/LightenDarken.gd +++ b/src/Tools/LightenDarken.gd @@ -26,13 +26,13 @@ class LightenDarkenOp extends Drawer.ColorOp: func process(_src: Color, dst: Color) -> Color: changed = true + if dst.a == 0: + return dst if shading_mode == ShadingMode.SIMPLE: if strength > 0: dst = dst.lightened(strength) -# dst.h += strength/8 elif strength < 0: dst = dst.darkened(-strength) -# dst.h += strength/8 else: if lighten_or_darken == LightenDarken.LIGHTEN: dst.h += (hue_amount / 359)