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:
parent
362872435e
commit
ef3e69f672
@ -144,7 +144,7 @@ void PixmapTransition::updateCurrentTime(int currentTime)
|
|||||||
if (m_currentPixmap.isNull()) {
|
if (m_currentPixmap.isNull()) {
|
||||||
m_currentPixmap = QPixmap(m_targetPixmap.size());
|
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);
|
QPainter p(&m_currentPixmap);
|
||||||
p.setCompositionMode(QPainter::CompositionMode_SourceIn);
|
p.setCompositionMode(QPainter::CompositionMode_SourceIn);
|
||||||
p.drawPixmap(m_currentPixmap.rect(), m_targetPixmap, m_targetPixmap.rect());
|
p.drawPixmap(m_currentPixmap.rect(), m_targetPixmap, m_targetPixmap.rect());
|
||||||
@ -153,7 +153,7 @@ void PixmapTransition::updateCurrentTime(int currentTime)
|
|||||||
m_currentPixmap = m_startPixmap;
|
m_currentPixmap = m_startPixmap;
|
||||||
QPainter p(&m_currentPixmap);
|
QPainter p(&m_currentPixmap);
|
||||||
p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
|
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();
|
p.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user