mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 10:34:43 -04: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
2 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue