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 .