Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QGraphicsScale Class

TheQGraphicsScale class provides a scale transformation.More...

Header:#include <QGraphicsScale>
Since: Qt 4.6
Instantiated By:Scale
Inherits:QGraphicsTransform

Properties

Public Functions

QGraphicsScale(QObject * parent = 0)
~QGraphicsScale()
QVector3Dorigin() const
voidsetOrigin(const QVector3D & point)
voidsetXScale(qreal)
voidsetYScale(qreal)
voidsetZScale(qreal)
qrealxScale() const
qrealyScale() const
qrealzScale() const

Reimplemented Public Functions

virtual voidapplyTo(QMatrix4x4 * matrix) const

Signals

Additional Inherited Members

Detailed Description

TheQGraphicsScale 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 isQPointF(0, 0).

The parametersxScale,yScale, andzScale 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 negativexScale value will mirror the item horizontally. A negativeyScale value will flip the item vertically. A negativezScale will flip the item end for end.

See alsoQGraphicsTransform,QGraphicsItem::setScale(), andQTransform::scale().

Property Documentation

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

Access functions:

QVector3Dorigin() const
voidsetOrigin(const QVector3D & point)

Notifier signal:

voidoriginChanged()

See alsoxScale,yScale, andzScale.

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.

Access functions:

qrealxScale() const
voidsetXScale(qreal)

Notifier signal:

voidxScaleChanged()

See alsoyScale,zScale, andorigin.

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.

Access functions:

qrealyScale() const
voidsetYScale(qreal)

Notifier signal:

voidyScaleChanged()

See alsoxScale,zScale, andorigin.

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.

Access functions:

qrealzScale() const
voidsetZScale(qreal)

Notifier signal:

voidzScaleChanged()

See alsoxScale,yScale, andorigin.

Member Function Documentation

QGraphicsScale::QGraphicsScale(QObject * parent = 0)

Constructs an emptyQGraphicsScale object with the givenparent.

QGraphicsScale::~QGraphicsScale()

Destroys the graphics scale.

[virtual]void QGraphicsScale::applyTo(QMatrix4x4 * matrix) const

Reimplemented fromQGraphicsTransform::applyTo().

[signal]void QGraphicsScale::scaleChanged()

This signal is emitted whenever thexScale,yScale, orzScale of the object changes.

See alsoQGraphicsScale::xScale,QGraphicsScale::yScale, andQGraphicsScale::zScale.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp