diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2009-08-14 19:30:28 (GMT) |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2009-08-14 19:32:15 (GMT) |
commit | 02e5239002786a55d68f04a512baa7d4c5f40e66 (patch) | |
tree | 63c4a54b3120b17acdc49d3dbe300ee30e73bcac /src/declarative | |
parent | 36a87c0a6cbc858dc5ae443cb16ded0f92c7725a (diff) | |
download | Qt-02e5239002786a55d68f04a512baa7d4c5f40e66.zip Qt-02e5239002786a55d68f04a512baa7d4c5f40e66.tar.gz Qt-02e5239002786a55d68f04a512baa7d4c5f40e66.tar.bz2 |
readd and fix the qml documentation for Rotation and Scale
This got forgotten during the move to QGraphicsTransform.
The docs also required a few adjustments as Rotation3D is
now gone and some properties in Scale and Rotation have
changed.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index f10977f..0b86a54 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -77,6 +77,92 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Scale,QGraphicsScale) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation) /*! + \qmlclass Transform + \brief A transformation. +*/ + +/*! + \qmlclass Scale + \brief A Scale object provides a way to scale an Item. + + The scale object gives more control over scaling than using Item's scale property. Specifically, + it allows a different scale for the x and y axes, and allows the scale to be relative to an + arbitrary point. + + The following example scales the X axis of the Rect, relative to its interior point 25, 25: + \qml + Rect { + width: 100; height: 100 + color: "blue" + transform: Scale { origin.x: 25; origin.y: 25; xScale: 3} + } + \endqml +*/ + +/*! + \qmlproperty real Scale::origin.x + \qmlproperty real Scale::origin.y + + The origin point for the scale. The scale will be relative to this point. +*/ + +/*! + \qmlproperty real Scale::xScale + + The scaling factor for the X axis. +*/ + +/*! + \qmlproperty real Scale::yScale + + The scaling factor for the Y axis. +*/ + +/*! + \qmlclass Rotation + \brief A Rotation object provides a way to rotate an Item around a point using an axis in 3D space. + + The following example rotates a Rect around its interior point 25, 25: + \qml + Rect { + width: 100; height: 100 + color: "blue" + transform: Rotation { origin.x: 25; origin.y: 25; angle: 45} + } + \endqml + + Here is an example of various rotations applied to an \l Image. + \snippet doc/src/snippets/declarative/rotation.qml 0 + + \image axisrotation.png +*/ + +/*! + \qmlproperty real Rotation::origin.x + \qmlproperty real Rotation::origin.y + + The point to rotate around. +*/ + +/*! + \qmlproperty real Rotation::axis.x + \qmlproperty real Rotation::axis.y + \qmlproperty real Rotation::axis.z + + A rotation axis is specified by a vector in 3D space By default the vector defines a rotation around the z-Axis. + + \image 3d-rotation-axis.png + +*/ + +/*! + \qmlproperty real Rotation::angle + + The angle, in degrees, to rotate. +*/ + + +/*! \group group_animation \title Animation */ |