[Qt-qml] Animated text halo: How to animate?

Eduardo Fleury eduardo.fleury at openbossa.org
Tue Oct 19 23:12:10 CEST 2010


Hi Charley,

IIRC, the "Rotation" object you created is an ordinary object, thus can
receive an "id" and have animations on its properties.

In other words, try changing "angle: 72" by a "NumberAnimation on angle {
something }"

Alternatively you could give an "id" to this Rotation element and then play
with "myRotationId.angle"

On Tue, Oct 19, 2010 at 5:54 PM, Charley Bay <charleyb123 at gmail.com> wrote:

> I'm trying to create QML code that rotates text in an
> apparent "halo" (like around a circle/sphere).  This should
> be easy, but I can't figure out how to animate aspects of
> a "transform: Rotation"
>
> For example, the following displays text that properly
> "rotates" back-and-forth, but I want to dynamically
> change the "angle" in the Rotation transform to make
> it "appear" that the text is "wrapping around" the circle
> as it approaches the edges:
>
>  Text {
>     text: "hello world!"
>     // HOW TO ANIMATE CHANGES IN "angle" ???
>     transform: Rotation { origin.x: 100; origin.y: 100; axis { x: 0;
> y: 1; z: 0 } angle: 72 }
>     smooth: true
>     SequentialAnimation on x {
>         loops: Animation.Infinite
>         NumberAnimation { to: 100; easing.type: Easing.InOutCubic;
> duration: 2000 }
>         NumberAnimation { to: 0; easing.type: Easing.InOutCubic;
> duration: 2000 }
>     }
>  }
>
> I looked at "RotationAnimation", but I can't seem to get it
> working right, and it doesn't seem to let me fiddle with
> the "z" axis (I may later want to "tilt" the text front-or-back
> by setting the z axis).
>
> Suggestions?  The goal is animated text-in-a-halo, possibly
> with front-on tilt perspective (e.g., so the user can see the
> "back" of the rotation with the text mirrored backwards).
> The "transform: Rotation {}" appears to be absolutely
> sufficient to get the proper "perspective" on the rotating
> text, (so I know it can be done), but I'm open to any
> suggestions.
>
> Thanks!
>
> --charley
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>



-- 
Eduardo M. Fleury
OpenBossa - INdT
http://eduardofleury.com/
http://www.openbossa.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101019/81c81a84/attachment.html 


More information about the Qt-qml mailing list