summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxtransform.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-05-01 06:26:59 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-05-01 06:26:59 (GMT)
commit8f52aee209aa64ef6719126547c767583870bd9f (patch)
tree587ce6fe8e250706a5a761c1119efbcd48a21a63 /src/declarative/fx/qfxtransform.cpp
parent6aeccc0f8b592d835d9ec32daecc0b5d104f132b (diff)
downloadQt-8f52aee209aa64ef6719126547c767583870bd9f.zip
Qt-8f52aee209aa64ef6719126547c767583870bd9f.tar.gz
Qt-8f52aee209aa64ef6719126547c767583870bd9f.tar.bz2
doc
Diffstat (limited to 'src/declarative/fx/qfxtransform.cpp')
-rw-r--r--src/declarative/fx/qfxtransform.cpp43
1 files changed, 25 insertions, 18 deletions
diff --git a/src/declarative/fx/qfxtransform.cpp b/src/declarative/fx/qfxtransform.cpp
index 8ff4c54..1fe02d1 100644
--- a/src/declarative/fx/qfxtransform.cpp
+++ b/src/declarative/fx/qfxtransform.cpp
@@ -85,16 +85,16 @@ void QFxTransform::update()
/*!
\qmlclass Axis
- \brief The Axis element defines an axis that can be used for rotation or translation.
+ \brief A Axis object defines an axis that can be used for rotation or translation.
An axis is specified by 2 points in 3D space: a start point and
an end point. While technically the axis is the line running through these two points
(and thus many different sets of two points could define the same axis), the distance
between the points does matter for translation along an axis.
- \code
+ \qml
Axis { startX: 0; startY: 0; endX: 20; endY: 30 }
- \endcode
+ \endqml
*/
QML_DEFINE_TYPE(QFxAxis, Axis);
@@ -179,7 +179,7 @@ void QFxAxis::setEndZ(qreal z)
/*!
\qmlclass Rotation3D
- \brief The Rotation3D element provides a way to rotate an Item around an axis.
+ \brief A Rotation3D object provides a way to rotate an Item around an axis.
Here is an example of various rotations applied to an \l Image.
\snippet doc/src/snippets/declarative/rotation.qml 0
@@ -317,16 +317,23 @@ void QFxRotation3D::update()
/*!
\qmlclass Translation3D
- \brief The Translation3D element provides a way to move an Item along an axis.
+ \brief A Translation3D object provides a way to move an Item along an axis.
The following example translates the image to 10, 3.
- \code
- <Image src="logo.png">
- <transform>
- <Translation3D axis.startX="0" axis.startY="0" axis.endX="1" axis.endY=".3" distance="10"/>
- </transform>
- </Image>
- \endcode
+ \qml
+Image {
+ src: "logo.png"
+ transform: [
+ Translation3D {
+ axis.startX: 0
+ axis.startY: 0
+ axis.endX: 1
+ axis.endY: .3
+ distance: 10
+ }
+ ]
+}
+ \endqml
*/
QML_DEFINE_TYPE(QFxTranslation3D,Translation3D);
@@ -367,9 +374,9 @@ QFxAxis *QFxTranslation3D::axis()
in the example below, a distance of 1 would translate to 100, 50, while a distance
of 0.5 would translate to 50, 25.
- \code
+ \qml
Translation3D { axis.startX: 0; axis.startY: 0; axis.endX: 100; axis.endY: 50 }
- \endcode
+ \endqml
*/
qreal QFxTranslation3D::distance() const
{
@@ -444,7 +451,7 @@ void QFxTranslation3D::update()
/*!
\qmlclass Perspective
- \brief The Perspective element specifies a perspective transformation.
+ \brief A Perspective object specifies a perspective transformation.
A Perspective transform only affects an item when running under OpenGL; when running under software
rasterization it has no effect.
@@ -501,10 +508,10 @@ QMatrix4x4 QFxPerspective::transform() const
/*!
\qmlclass Squish
- \brief The Squish element allows you to distort an items appearance by 'squishing' it.
+ \brief A Squish object allows you to distort an items appearance by 'squishing' it.
Here is an example of various \l Image squishes.
- \code
+ \qml
Rect {
id: Screen
width: 360; height: 80
@@ -556,7 +563,7 @@ QMatrix4x4 QFxPerspective::transform() const
}
}
}
- \endcode
+ \endqml
\image squish.png
*/