apparently this is more efficient; thx frederikh

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678250
This commit is contained in:
Aaron J. Seigo 2007-06-20 23:33:26 +00:00
parent 4fcf10e6bc
commit d734b95419

View File

@ -48,21 +48,14 @@ int Animator::elementFrameCount(Plasma::Phase::ElementAnimation animation)
QPixmap Animator::elementAppear(qreal frame, const QPixmap& pixmap) QPixmap Animator::elementAppear(qreal frame, const QPixmap& pixmap)
{ {
Q_UNUSED(frame) Q_UNUSED(frame)
Q_UNUSED(pixmap)
return pixmap; return pixmap;
} }
QPixmap Animator::elementDisappear(qreal frame, const QPixmap& pixmap) QPixmap Animator::elementDisappear(qreal frame, const QPixmap& pixmap)
{ {
Q_UNUSED(frame) Q_UNUSED(frame)
Q_UNUSED(pixmap)
QPixmap alpha(pixmap.size());
{
QPainter painter(&alpha);
painter.fillRect(alpha.rect(), Qt::black);
}
QPixmap pix(pixmap.size()); QPixmap pix(pixmap.size());
pix.setAlphaChannel(alpha); pix.fill(Qt::transparent);
return pix; return pix;
} }