The QGraphicsScale class provides a scale transformation. 更多...
| 頭: | #include <QGraphicsScale> |
| qmake: | QT += widgets |
| Since: | Qt 4.6 |
| 繼承: | QGraphicsTransform |
| QGraphicsScale (QObject * parent = nullptr) | |
| virtual | ~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 override |
| void | originChanged () |
| void | scaleChanged () |
| void | xScaleChanged () |
| void | yScaleChanged () |
| void | zScaleChanged () |
| const QMetaObject | staticMetaObject |
The QGraphicsScale class provides a scale transformation.
QGraphicsScene 提供幫助控製應如何應用比例縮放的某些參數。
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).
參數 xScale , yScale ,和 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.
另請參閱 QGraphicsTransform , QGraphicsItem::setScale (),和 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).
訪問函數:
| QVector3D | origin () const |
| void | setOrigin (const QVector3D & point ) |
通知程序信號:
| void | originChanged () |
另請參閱 xScale , yScale ,和 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.
訪問函數:
| qreal | xScale () const |
| void | setXScale ( qreal ) |
通知程序信號:
| void | xScaleChanged () |
另請參閱 yScale , zScale ,和 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.
訪問函數:
| qreal | yScale () const |
| void | setYScale ( qreal ) |
通知程序信號:
| void | yScaleChanged () |
另請參閱 xScale , zScale ,和 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.
訪問函數:
| qreal | zScale () const |
| void | setZScale ( qreal ) |
通知程序信號:
| void | zScaleChanged () |
另請參閱 xScale , yScale ,和 origin .
構造空的 QGraphicsScale 對象采用給定 parent .
[虛擬]
QGraphicsScale::
~QGraphicsScale
()
Destroys the graphics scale.
[override virtual]
void
QGraphicsScale::
applyTo
(
QMatrix4x4
*
matrix
) const
重實現自 QGraphicsTransform::applyTo ().
[signal]
void
QGraphicsScale::
originChanged
()
QGraphicsScale emits this signal when its origin changes.
注意: 通知程序信號對於特性 origin .
另請參閱 QGraphicsScale::origin .
[signal]
void
QGraphicsScale::
scaleChanged
()
此信號發射,每當 xScale , yScale ,或 zScale of the object changes.
另請參閱 QGraphicsScale::xScale , QGraphicsScale::yScale ,和 QGraphicsScale::zScale .
[signal]
void
QGraphicsScale::
xScaleChanged
()
此信號發射,每當 xScale 特性改變。
該函數在 Qt 4.7 引入。
注意: 通知程序信號對於特性 xScale .
[signal]
void
QGraphicsScale::
yScaleChanged
()
此信號發射,每當 yScale 特性改變。
該函數在 Qt 4.7 引入。
注意: 通知程序信號對於特性 yScale .
[signal]
void
QGraphicsScale::
zScaleChanged
()
此信號發射,每當 zScale 特性改變。
該函數在 Qt 4.7 引入。
注意: 通知程序信號對於特性 zScale .