1// qtransform.sip generated by MetaSIP 2// 3// This file is part of the QtGui Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23%ModuleCode 24#include <qtransform.h> 25%End 26 27class QTransform 28{ 29%TypeHeaderCode 30#include <qtransform.h> 31%End 32 33%PickleCode 34 sipRes = Py_BuildValue((char *)"ddddddddd", sipCpp->m11(), sipCpp->m12(), sipCpp->m13(), sipCpp->m21(), sipCpp->m22(), sipCpp->m23(), sipCpp->m31(), sipCpp->m32(), sipCpp->m33()); 35%End 36 37public: 38 enum TransformationType 39 { 40 TxNone, 41 TxTranslate, 42 TxScale, 43 TxRotate, 44 TxShear, 45 TxProject, 46 }; 47 48 QTransform(); 49 QTransform(qreal m11, qreal m12, qreal m13, qreal m21, qreal m22, qreal m23, qreal m31, qreal m32, qreal m33 = 1.0e+0); 50 QTransform(qreal h11, qreal h12, qreal h13, qreal h21, qreal h22, qreal h23); 51%If (Qt_5_7_0 -) 52 QTransform(const QTransform &other); 53%End 54 QTransform::TransformationType type() const; 55 void setMatrix(qreal m11, qreal m12, qreal m13, qreal m21, qreal m22, qreal m23, qreal m31, qreal m32, qreal m33); 56 QTransform inverted(bool *invertible = 0) const; 57 QTransform adjoint() const; 58 QTransform transposed() const; 59 QTransform &translate(qreal dx, qreal dy); 60 QTransform &scale(qreal sx, qreal sy); 61 QTransform &shear(qreal sh, qreal sv); 62 QTransform &rotate(qreal angle, Qt::Axis axis = Qt::ZAxis); 63 QTransform &rotateRadians(qreal angle, Qt::Axis axis = Qt::ZAxis); 64 static bool squareToQuad(const QPolygonF &square, QTransform &result); 65 static bool quadToSquare(const QPolygonF &quad, QTransform &result); 66 static bool quadToQuad(const QPolygonF &one, const QPolygonF &two, QTransform &result); 67 bool operator==(const QTransform &) const; 68 bool operator!=(const QTransform &) const; 69 QTransform &operator*=(const QTransform &) /__imatmul__/; 70 QTransform operator*(const QTransform &o) const /__matmul__/; 71 void reset(); 72 void map(int x /Constrained/, int y /Constrained/, int *tx, int *ty) const; 73 void map(qreal x, qreal y, qreal *tx, qreal *ty) const; 74 QPoint map(const QPoint &p) const; 75 QPointF map(const QPointF &p) const; 76 QLine map(const QLine &l) const; 77 QLineF map(const QLineF &l) const; 78 QPolygonF map(const QPolygonF &a) const; 79 QPolygon map(const QPolygon &a) const; 80 QRegion map(const QRegion &r) const; 81 QPainterPath map(const QPainterPath &p) const; 82 QPolygon mapToPolygon(const QRect &r) const; 83 QRect mapRect(const QRect &) const; 84 QRectF mapRect(const QRectF &) const; 85 bool isAffine() const; 86 bool isIdentity() const; 87 bool isInvertible() const; 88 bool isScaling() const; 89 bool isRotating() const; 90 bool isTranslating() const; 91 qreal determinant() const; 92 qreal m11() const; 93 qreal m12() const; 94 qreal m13() const; 95 qreal m21() const; 96 qreal m22() const; 97 qreal m23() const; 98 qreal m31() const; 99 qreal m32() const; 100 qreal m33() const; 101 qreal dx() const; 102 qreal dy() const; 103 static QTransform fromTranslate(qreal dx, qreal dy); 104 static QTransform fromScale(qreal dx, qreal dy); 105 QTransform &operator*=(qreal num); 106 QTransform &operator/=(qreal div); 107 QTransform &operator+=(qreal num); 108 QTransform &operator-=(qreal num); 109%If (Qt_5_6_0 -) 110 long __hash__() const; 111%MethodCode 112 sipRes = qHash(*sipCpp); 113%End 114 115%End 116}; 117 118QDataStream &operator<<(QDataStream &, const QTransform & /Constrained/) /ReleaseGIL/; 119QDataStream &operator>>(QDataStream &, QTransform & /Constrained/) /ReleaseGIL/; 120QPoint operator*(const QPoint &p, const QTransform &m); 121QPointF operator*(const QPointF &p, const QTransform &m); 122QLineF operator*(const QLineF &l, const QTransform &m); 123QLine operator*(const QLine &l, const QTransform &m); 124QPolygon operator*(const QPolygon &a, const QTransform &m); 125QPolygonF operator*(const QPolygonF &a, const QTransform &m); 126QRegion operator*(const QRegion &r, const QTransform &m); 127QPainterPath operator*(const QPainterPath &p, const QTransform &m); 128QTransform operator*(const QTransform &a, qreal n); 129QTransform operator/(const QTransform &a, qreal n); 130QTransform operator+(const QTransform &a, qreal n); 131QTransform operator-(const QTransform &a, qreal n); 132bool qFuzzyCompare(const QTransform &t1, const QTransform &t2); 133