The Scale element provides a way to scale an Item. More...
Scale instantiates the C++ class QGraphicsScale
This element was introduced in Qt 4.7.
The Scale element 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 Rectangle, relative to its interior point 25, 25:
Rectangle { width: 100; height: 100 color: "blue" transform: Scale { origin.x: 25; origin.y: 25; xScale: 3} }
See also Rotation and Translate.
The point that the item is scaled from (i.e., the point that stays fixed relative to the parent as the rest of the item grows). By default the origin is 0, 0.
xScale : real |
The scaling factor for the X axis.
yScale : real |
The scaling factor for the Y axis.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.