diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-10-05 11:26:57 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-05 07:33:29 +0200 |
commit | 08c975bd77f8fdbbdb5c4694d898a724db900849 (patch) | |
tree | 9b50e1910c5cade3ba7d8dbdb772b316ed48dfc2 /src/declarative/particles/qsgimageparticle_p.h | |
parent | e225ee5a6a50400fc02536e511b1e10f3d53f110 (diff) |
Sprites can now have varying width and height
Varying between Sprites, or between width and height, not within a
single Sprite. For ImageParticle only, SpriteImage changes will be in a
later commit.
Also adds spriteInterpolation boolean.
Change-Id: I80681e44f26985a6f6a6b83bd162f6231c7f28c4
Reviewed-on: http://codereview.qt-project.org/6002
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/declarative/particles/qsgimageparticle_p.h')
-rw-r--r-- | src/declarative/particles/qsgimageparticle_p.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/declarative/particles/qsgimageparticle_p.h b/src/declarative/particles/qsgimageparticle_p.h index 274ff42b58..89796da356 100644 --- a/src/declarative/particles/qsgimageparticle_p.h +++ b/src/declarative/particles/qsgimageparticle_p.h @@ -130,10 +130,14 @@ struct SpriteVertex { float rotation; float rotationSpeed; float autoRotate;//Assumed that GPUs prefer floats to bools - float animIdx; + float animInterpolate; float frameDuration; float frameCount; float animT; + float animX; + float animY; + float animWidth; + float animHeight; }; template <typename Vertex> @@ -177,6 +181,7 @@ class QSGImageParticle : public QSGParticlePainter //yVector is the same, but top-left to bottom-left. The particle is always a parallelogram. Q_PROPERTY(QSGDirection* yVector READ yVector WRITE setYVector NOTIFY yVectorChanged RESET resetDeformation) Q_PROPERTY(QDeclarativeListProperty<QSGSprite> sprites READ sprites) + Q_PROPERTY(bool spritesInterpolate READ spritesInterpolate WRITE setSpritesInterpolate NOTIFY spritesInterpolateChanged) Q_PROPERTY(EntryEffect entryEffect READ entryEffect WRITE setEntryEffect NOTIFY entryEffectChanged) Q_PROPERTY(bool bloat READ bloat WRITE setBloat NOTIFY bloatChanged)//Just a debugging property to bypass optimizations @@ -248,6 +253,8 @@ public: QSGDirection* yVector() const { return m_yVector; } + bool spritesInterpolate() const { return m_spritesInterpolate; } + bool bloat() const { return m_bloat; } EntryEffect entryEffect() const { return m_entryEffect; } @@ -291,6 +298,8 @@ signals: void yVectorChanged(QSGDirection* arg); + void spritesInterpolateChanged(bool arg); + void bloatChanged(bool arg); void entryEffectChanged(EntryEffect arg); @@ -321,6 +330,8 @@ public slots: void setYVector(QSGDirection* arg); + void setSpritesInterpolate(bool arg); + void setBloat(bool arg); void setEntryEffect(EntryEffect arg); @@ -372,6 +383,7 @@ private: QList<QSGSprite*> m_sprites; QSGSpriteEngine* m_spriteEngine; + bool m_spritesInterpolate; bool m_explicitColor; bool m_explicitRotation; |