Use topmost height for a stack of only transparent nodes

This commit is contained in:
Rogier 2014-06-21 21:28:38 +02:00
parent 185bf90c4b
commit c0a62b7874

View File

@ -261,6 +261,7 @@ void PixelAttribute::mixUnder(const PixelAttribute &p)
m_a = (m_a + (1 - m_a) * pp.m_a);
if (pp.m_a != 1)
m_t = (m_t + pp.m_t) / 2;
else
m_h = pp.m_h;
if ((m_mixMode & AlphaMixDarkenBit) && prev_alpha >= 254 && pp.alpha() < 255) {
// Darken
@ -285,9 +286,9 @@ void PixelAttribute::mixUnder(const PixelAttribute &p)
normalize();
m_t = t;
m_a = 1;
}
m_h = m_n * h;
}
}
#ifdef DEBUG
else {
// Internal error