diff options
author | Alan Alpert <416365416c@gmail.com> | 2012-11-21 19:49:39 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-29 08:49:45 +0100 |
commit | 525eebcd3aa9b1c04bc6489ebe73c18d619ebdf9 (patch) | |
tree | af66fb2d9aab1de62ee4feb6d3c5b406a0c03aaa /src | |
parent | d02131e743597b9bd3070d986c61a1c91ea8317a (diff) |
Apply full transform
Previously the particle system was only applying the translaton of the
relative transfrom from any emitters. Now the full transform is used.
Task-number: QTBUG-25518
Change-Id: I4c654837c37dbef8f6f407387ce4ea82cb3b821c
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/particles/qquickparticlesystem.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/particles/qquickparticlesystem.cpp b/src/particles/qquickparticlesystem.cpp index a43b3009df..e0b050d3ff 100644 --- a/src/particles/qquickparticlesystem.cpp +++ b/src/particles/qquickparticlesystem.cpp @@ -1094,10 +1094,13 @@ QQuickParticleData* QQuickParticleSystem::newDatum(int groupId, bool respectLimi void QQuickParticleSystem::emitParticle(QQuickParticleData* pd) {// called from prepareNextFrame()->emitWindow - enforce? //Account for relative emitter position - QPointF offset = this->mapFromItem(pd->e, QPointF(0, 0)); - if (!offset.isNull()) { - pd->x += offset.x(); - pd->y += offset.y(); + bool okay = false; + QTransform t = pd->e->itemTransform(this, &okay); + if (okay) { + qreal tx,ty; + t.map(pd->x, pd->y, &tx, &ty); + pd->x = tx; + pd->y = ty; } finishNewDatum(pd); |