never make the pixmap fully opaque, because the alpha channel would get disabled, obtaining a so pretty black rectangle

svn path=/trunk/KDE/kdelibs/; revision=1088460
This commit is contained in:
Marco Martin 2010-02-10 21:54:12 +00:00
parent 362872435e
commit ef3e69f672

View File

@ -144,7 +144,7 @@ void PixmapTransition::updateCurrentTime(int currentTime)
if (m_currentPixmap.isNull()) {
m_currentPixmap = QPixmap(m_targetPixmap.size());
}
m_currentPixmap.fill(QColor(0, 0, 0, (int)(((qreal)255)*delta)));
m_currentPixmap.fill(QColor(0, 0, 0, (int)(((qreal)255)*qMin((qreal)0.98, delta))));
QPainter p(&m_currentPixmap);
p.setCompositionMode(QPainter::CompositionMode_SourceIn);
p.drawPixmap(m_currentPixmap.rect(), m_targetPixmap, m_targetPixmap.rect());
@ -153,7 +153,7 @@ void PixmapTransition::updateCurrentTime(int currentTime)
m_currentPixmap = m_startPixmap;
QPainter p(&m_currentPixmap);
p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
p.fillRect(m_currentPixmap.rect(), QColor(0, 0, 0, (int)(((qreal)255)*delta)));
p.fillRect(m_currentPixmap.rect(), QColor(0, 0, 0, (int)(((qreal)255)*qMin((qreal)0.98, delta))));
p.end();
}
}