[Qt-qml] Custom transform origin point during rotation
Dietrich.Gossen at continental-corporation.com
Dietrich.Gossen at continental-corporation.com
Wed Dec 21 11:04:19 CET 2011
Hi,
I am having problems to set a custom transform origin point and rotate an
image around it.
That’s how I do it now (without success):
That’s the definition of the image and the state
1. Image {
2. id: image1
3. smooth: true
4. source: "image1.png"
5. }
6.
7. State {
8. name: "rotated"
9. PropertyChanges {
10. target: image1
11. transformOriginPoint: Qt.point(20, 40)
12. }
13. }
That’s my animation—
1. SequentialAnimation{
2. loops: Animation.Infinite
3. running: true
4.
5. PropertyAction { target: image1; property:
"transformOriginPoint" }
6. RotationAnimation { target: image1; to: 180;
direction: RotationAnimation.Clockwise; duration: 2000}
7.
8. PropertyAction { target: image1; property:
"transformOriginPoint" }
9. RotationAnimation { target: image1; to: 0; direction:
RotationAnimation.Counterclockwise; duration: 2000
10. }
I couldn’t find any example in the documentation about custom transform
origin points.
Thanks
Mit freundlichen Grüßen
Dietrich Gossen
Continental Engineering Services
Rechnungsanschrift/Billing Address/Besucheradresse/Visitor Address:
Continental Engineering Services GmbH
Osterhofener Straße 17, 93055 Regensburg, Germany
Postfach 10 09 43, 93009 Regensburg, Germany
Telefon/Phone: +49 941 790-5681
Telefax: +49 941 79099-6590
E-Mail: dietrich.gossen at continental-corporation.com
http://www.conti-engineering.com
_____________________________________________
Continental Engineering Services GmbH, Graf-Vollrath-Weg 6, D-60489
Frankfurt/Main
Geschaeftsfuehrer/Managing Director: Bernd Neitzel, Dr. Stefan Stoelzl,
Dr. Jochen Weisse
Sitz der Gesellschaft/Registered Office: Frankfurt
Registergericht/Registered Court: Amtsgericht Frankfurt HRB 76752
_____________________________________________
Proprietary and confidential. Distribution only by express authority of
Continental AG or its subsidiaries.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20111221/4b558bb7/attachment.html
More information about the Qt-qml
mailing list