The QGraphicsScale class provides a scale transformation. More...
#include <QGraphicsScale>
Inherits: QGraphicsTransform.
This class was introduced in Qt 4.6.
QGraphicsScale ( QObject * parent = 0 ) | |
~QGraphicsScale () | |
QVector3D | origin () const |
void | setOrigin ( const QVector3D & point ) |
void | setXScale ( qreal ) |
void | setYScale ( qreal ) |
void | setZScale ( qreal ) |
qreal | xScale () const |
qreal | yScale () const |
qreal | zScale () const |
virtual void | applyTo ( QMatrix4x4 * matrix ) const |
void | originChanged () |
void | scaleChanged () |
void | xScaleChanged () |
void | yScaleChanged () |
void | zScaleChanged () |
The QGraphicsScale class provides a scale transformation.
QGraphicsScene provides certain parameters to help control how the scale should be applied.
The origin is the point that the item is scaled from (i.e., it stays fixed relative to the parent as the rest of the item grows). By default the origin is QPointF(0, 0).
The parameters xScale, yScale, and zScale describe the scale factors to apply in horizontal, vertical, and depth directions. They can take on any value, including 0 (to collapse the item to a point) or negative value. A negative xScale value will mirror the item horizontally. A negative yScale value will flip the item vertically. A negative zScale will flip the item end for end.
See also QGraphicsTransform, QGraphicsItem::setScale(), and QTransform::scale().
This property holds the origin of the scale in 3D space.
All scaling will be done relative to this point (i.e., this point will stay fixed, relative to the parent, when the item is scaled).
Access functions:
QVector3D | origin () const |
void | setOrigin ( const QVector3D & point ) |
Notifier signal:
void | originChanged () |
See also xScale, yScale, and zScale.
This property holds the horizontal scale factor.
The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be mirrored horizontally around its origin.
Access functions:
qreal | xScale () const |
void | setXScale ( qreal ) |
Notifier signal:
void | xScaleChanged () |
See also yScale, zScale, and origin.
This property holds the vertical scale factor.
The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped vertically around its origin.
Access functions:
qreal | yScale () const |
void | setYScale ( qreal ) |
Notifier signal:
void | yScaleChanged () |
See also xScale, zScale, and origin.
This property holds the depth scale factor.
The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped end for end around its origin.
Access functions:
qreal | zScale () const |
void | setZScale ( qreal ) |
Notifier signal:
void | zScaleChanged () |
Constructs an empty QGraphicsScale object with the given parent.
Destroys the graphics scale.
Reimplemented from QGraphicsTransform::applyTo().
QGraphicsScale emits this signal when its origin changes.
See also QGraphicsScale::origin.
This signal is emitted whenever the xScale, yScale, or zScale of the object changes.
See also QGraphicsScale::xScale, QGraphicsScale::yScale, and QGraphicsScale::zScale.
This signal is emitted whenever the xScale property changes.
This function was introduced in Qt 4.7.
This signal is emitted whenever the yScale property changes.
This function was introduced in Qt 4.7.
This signal is emitted whenever the zScale property changes.
This function was introduced in Qt 4.7.
© 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.