Fix painting with transparent color, opacity 255, Indexed color mode, in Alpha Compositing to behave as Simple Ink (fix #3047)

This commit is contained in:
Gaspar Capello 2022-02-15 12:00:33 -03:00 committed by David Capello
parent e12fb556c1
commit ef31179934

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2018-2021 Igara Studio S.A.
// Copyright (C) 2018-2022 Igara Studio S.A.
// Copyright (C) 2001-2018 David Capello
//
// This program is distributed under the terms of
@ -148,8 +148,10 @@ public:
// opaque if opacity == 255.
if (m_type == Simple)
opaque = true;
else if (color == loop->sprite()->transparentColor())
else if (color == loop->sprite()->transparentColor() &&
loop->getLayer()->isTransparent()) {
opaque = false;
}
else {
color = get_current_palette()->getEntry(color);
opaque = (rgba_geta(color) == 255);