[Qt-qml] Custom transform origin point during rotation

Matthias Feldweg matthias.feldweg at e-gits.com
Wed Dec 21 11:34:16 CET 2011


You can add a "QML Rotation Element" to the image transformation list
see http://doc.qt.nokia.com/4.7/qml-rotation.html.

Animate the properties of the rotation.

     Image <http://doc.qt.nokia.com/4.7-snapshot/qml-image.html> {
         source: "pics/qt.png"
         transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 18 }
         smooth: true
     }





Am 21.12.2011 11:04, schrieb Dietrich.Gossen at continental-corporation.com:
> 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_
> <http://developer.qt.nokia.com/doc/Qt.html>.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.
>
>
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml


-- 

Mit freundlichen Grüßen / Kind regards 

Matthias Feldweg 
Senior Software Engineer 

e-GITS GmbH 
Global IT Solutions 
Curiestrasse 2 
70563 Stuttgart, Germany 

Phone +49 (0) 711.67.400.174 
Fax +49 (0) 711.67.400.469 

_______________________________________________________________ 

Sitz der GmbH: Stuttgart, Amtsgericht Stuttgart HRB 23517 
Geschäftsführer: Sven Liess 
_______________________________________________________________ 


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige 
Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie 
die unbefugte Weitergabe dieser Mail ist nicht gestattet. 

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or 
have received this e-mail in error) please notify 
the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the 
material in this e-mail is strictly forbidden.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20111221/104bec9f/attachment-0001.html 


More information about the Qt-qml mailing list