Skip to content

PythonQt.QtGui.QTransform · declarations 002

Back to PythonQt.QtGui.QTransform

setMatrix

setMatrix(m11: float, m12: float, m13: float, m21: float, m22: float, m23: float, m31: float, m32: float, m33: float) -> None

X.setMatrix(m11, m12, m13, m21, m22, m23, m31, m32, m33)

Supplemental documentation: Qt 5 reference:

void QTransform::setMatrix(qreal m11, qreal m12, qreal m13, qreal m21, qreal m22, qreal m23, qreal m31, qreal m32, qreal m33)

Sets the matrix elements to the specified values, m11, m12, m13 m21, m22, m23 m31, m32 and m33. Note that this function replaces the previous values. QTransform provides the translate(), rotate(), scale() and shear() convenience functions to manipulate the various matrix elements based on the currently defined coordinate system.

See also QTransform().

Upstream PySide2 reference signatures (binding differences may apply):

setMatrix(self, m11: float, m12: float, m13: float, m21: float, m22: float, m23: float, m31: float, m32: float, m33: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtransform.html#setMatrix

shear

shear(sh: float, sv: float) -> Any

X.shear(sh, sv) -> PythonQt.QtGui.QTransform

Supplemental documentation: Qt 5 reference:

QTransform \&QTransform::shear(qreal sh, qreal sv)

Shears the coordinate system by sh horizontally and sv vertically, and returns a reference to the matrix.

See also setMatrix().

Upstream PySide2 reference signatures (binding differences may apply):

shear(self, sh: float, sv: float) -> PySide2.QtGui.QTransform

Source: https://doc.qt.io/archives/qt-5.15/qtransform.html#shear

squareToQuad

squareToQuad(square: Any, result: Any) -> bool

X.squareToQuad(square, result) -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QTransform::squareToQuad(const QPolygonF \&quad, QTransform \&trans)

Creates a transformation matrix, trans, that maps a unit square to a four-sided polygon, quad. Returns true if the transformation is constructed or false if such a transformation does not exist.

See also quadToSquare() and quadToQuad().

Upstream PySide2 reference signatures (binding differences may apply):

squareToQuad(arg__1: PySide2.QtGui.QPolygonF) -> object
squareToQuad(square: PySide2.QtGui.QPolygonF, result: PySide2.QtGui.QTransform) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtransform.html#squareToQuad

toAffine

toAffine() -> Any

X.toAffine() -> PythonQt.QtGui.QMatrix

Upstream PySide2 reference signatures (binding differences may apply):

toAffine(self) -> PySide2.QtGui.QMatrix

Source: https://doc.qt.io/archives/qt-5.15/qtransform.html#toAffine

translate

translate(dx: float, dy: float) -> Any

X.translate(dx, dy) -> PythonQt.QtGui.QTransform

Supplemental documentation: Qt 5 reference:

QTransform \&QTransform::translate(qreal dx, qreal dy)

Moves the coordinate system dx along the x axis and dy along the y axis, and returns a reference to the matrix.

See also setMatrix().

Upstream PySide2 reference signatures (binding differences may apply):

translate(self, dx: float, dy: float) -> PySide2.QtGui.QTransform

Source: https://doc.qt.io/archives/qt-5.15/qtransform.html#translate

transposed

transposed() -> Any

X.transposed() -> PythonQt.QtGui.QTransform

Supplemental documentation: Qt 5 reference:

QTransform QTransform::transposed() const

Returns the transpose of this matrix.

Upstream PySide2 reference signatures (binding differences may apply):

transposed(self) -> PySide2.QtGui.QTransform

Source: https://doc.qt.io/archives/qt-5.15/qtransform.html#transposed

type

type() -> Any

X.type()

Supplemental documentation: Qt 5 reference:

QTransform::TransformationType QTransform::type() const

Returns the transformation type of this matrix.

The transformation type is the highest enumeration value capturing all of the matrix's transformations. For example, if the matrix both scales and shears, the type would be TxShear, because TxShear has a higher enumeration value than TxScale.

Knowing the transformation type of a matrix is useful for optimization: you can often handle specific types more optimally than handling the generic case.

Upstream PySide2 reference signatures (binding differences may apply):

type(self) -> PySide2.QtGui.QTransform.TransformationType

Source: https://doc.qt.io/archives/qt-5.15/qtransform.html#type