QGraphicsScale 類

The QGraphicsScale class provides a scale transformation. 更多...

頭: #include <QGraphicsScale>
qmake: QT += widgets
Since: Qt 4.6
繼承: QGraphicsTransform

特性

公共函數

QGraphicsScale (QObject * parent = Q_NULLPTR)
~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 提供幫助控製應如何應用比例縮放的某些參數。

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 ().

特性文檔編製

origin : QVector3D

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 .

xScale : qreal

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 .

yScale : qreal

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 .

zScale : qreal

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:: QGraphicsScale ( QObject * parent = Q_NULLPTR)

構造空的 QGraphicsScale 對象采用給定 parent .

QGraphicsScale:: ~QGraphicsScale ()

Destroys the graphics scale.

[虛擬] 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 .