summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-02-26 08:44:33 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-02-26 08:44:33 (GMT)
commit540c19cd525fe0eb4fc70cfd625deeb77eb1b7cf (patch)
tree8ee7e6d700de3d911e8d0ccf4e2b2cd0a417fcde /src/declarative
parent84fd26983a40ecae3e761106aa8f550c3b7fd7ba (diff)
parent7944ac1fb6eb0ae3bbbfdf6780b52f7174174a93 (diff)
downloadQt-540c19cd525fe0eb4fc70cfd625deeb77eb1b7cf.zip
Qt-540c19cd525fe0eb4fc70cfd625deeb77eb1b7cf.tar.gz
Qt-540c19cd525fe0eb4fc70cfd625deeb77eb1b7cf.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsparticles.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
index 14c7c71..3f4521e 100644
--- a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
@@ -1205,7 +1205,7 @@ void QmlGraphicsParticlesPainter::paint(QPainter *p, const QStyleOptionGraphicsI
const int myX = x() + parentItem()->x();
const int myY = y() + parentItem()->y();
- QVarLengthArray<QDrawPixmaps::Data, 256> pixmapData;
+ QVarLengthArray<QPainter::Fragment, 256> pixmapData;
pixmapData.resize(d->particles.count());
const QRectF sourceRect = d->image.rect();
@@ -1213,16 +1213,20 @@ void QmlGraphicsParticlesPainter::paint(QPainter *p, const QStyleOptionGraphicsI
qreal halfPHeight = sourceRect.height()/2.;
for (int i = 0; i < d->particles.count(); ++i) {
const QmlGraphicsParticle &particle = d->particles.at(i);
- pixmapData[i].point = QPointF(particle.x - myX + halfPWidth, particle.y - myY + halfPHeight);
+ pixmapData[i].x = particle.x - myX + halfPWidth;
+ pixmapData[i].y = particle.y - myY + halfPHeight;
pixmapData[i].opacity = particle.opacity;
//these never change
pixmapData[i].rotation = 0;
pixmapData[i].scaleX = 1;
pixmapData[i].scaleY = 1;
- pixmapData[i].source = sourceRect;
+ pixmapData[i].sourceLeft = sourceRect.left();
+ pixmapData[i].sourceTop = sourceRect.top();
+ pixmapData[i].width = sourceRect.width();
+ pixmapData[i].height = sourceRect.height();
}
- qDrawPixmaps(p, pixmapData.data(), d->particles.count(), d->image);
+ p->drawPixmapFragments(pixmapData.data(), d->particles.count(), d->image);
}
void QmlGraphicsParticles::componentComplete()