mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-07 10:59:49 +00:00
Using the lighten/darken on pixels with an alpha value of 0 no longer has an effect on them.
This commit is contained in:
parent
b1b4497ae8
commit
ebb6d74d9f
|
@ -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 "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 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))
|
- 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.
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
## [v0.8.1] - 2020-10-14
|
## [v0.8.1] - 2020-10-14
|
||||||
|
|
|
@ -26,13 +26,13 @@ class LightenDarkenOp extends Drawer.ColorOp:
|
||||||
|
|
||||||
func process(_src: Color, dst: Color) -> Color:
|
func process(_src: Color, dst: Color) -> Color:
|
||||||
changed = true
|
changed = true
|
||||||
|
if dst.a == 0:
|
||||||
|
return dst
|
||||||
if shading_mode == ShadingMode.SIMPLE:
|
if shading_mode == ShadingMode.SIMPLE:
|
||||||
if strength > 0:
|
if strength > 0:
|
||||||
dst = dst.lightened(strength)
|
dst = dst.lightened(strength)
|
||||||
# dst.h += strength/8
|
|
||||||
elif strength < 0:
|
elif strength < 0:
|
||||||
dst = dst.darkened(-strength)
|
dst = dst.darkened(-strength)
|
||||||
# dst.h += strength/8
|
|
||||||
else:
|
else:
|
||||||
if lighten_or_darken == LightenDarken.LIGHTEN:
|
if lighten_or_darken == LightenDarken.LIGHTEN:
|
||||||
dst.h += (hue_amount / 359)
|
dst.h += (hue_amount / 359)
|
||||||
|
|
Loading…
Reference in a new issue