diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-09-22 18:38:42 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-23 03:50:16 +0200 |
commit | aeaeae212ae91e60dc0e7a8c5043c6c1ee4da736 (patch) | |
tree | 8beee72920276c46c80c0974ee0c50e74ec7c1c8 /src/declarative/particles | |
parent | 100c9cec71b5f751acd202d5181bdef3a80eb140 (diff) |
Fix documentation
Had x in the y docs, and the pointX/Y weren't relative as the docs had
stated.
Change-Id: I709f3a30dc527d22abc2ab3987bea359c0e66214
Reviewed-on: http://codereview.qt-project.org/5376
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/declarative/particles')
-rw-r--r-- | src/declarative/particles/qsgpointattractor.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/declarative/particles/qsgpointattractor.cpp b/src/declarative/particles/qsgpointattractor.cpp index 8c2632f2c8..093e55b16c 100644 --- a/src/declarative/particles/qsgpointattractor.cpp +++ b/src/declarative/particles/qsgpointattractor.cpp @@ -56,7 +56,6 @@ QT_BEGIN_NAMESPACE Note that Attractor has the standard Item x,y,width and height properties. Like other affectors, these represent the affected area. They do not represent the 0x0 point which is the target of the attraction. - */ @@ -69,8 +68,8 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty real QtQuick.Particles2::PointAttractor::pointY - The x coordinate of the attracting point. This is relative - to the x coordinate of the Attractor. + The y coordinate of the attracting point. This is relative + to the y coordinate of the Attractor. */ /*! \qmlproperty real QtQuick.Particles2::PointAttractor::strength @@ -116,8 +115,8 @@ bool QSGAttractorAffector::affectParticle(QSGParticleData *d, qreal dt) { if (m_strength == 0.0) return false; - qreal dx = m_x - d->curX(); - qreal dy = m_y - d->curY(); + qreal dx = m_x+m_offset.x() - d->curX(); + qreal dy = m_y+m_offset.y() - d->curY(); qreal r = sqrt((dx*dx) + (dy*dy)); qreal theta = atan2(dy,dx); qreal ds = 0; |