| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942 |
- // qgenericmatrix.sip generated by MetaSIP
- //
- // This file is part of the QtGui Python extension module.
- //
- // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
- //
- // This file is part of PyQt6.
- //
- // This file may be used under the terms of the GNU General Public License
- // version 3.0 as published by the Free Software Foundation and appearing in
- // the file LICENSE included in the packaging of this file. Please review the
- // following information to ensure the GNU General Public License version 3.0
- // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
- //
- // If you do not wish to use this file under the terms of the GPL version 3.0
- // then you may purchase a commercial license. For more information contact
- // info@riverbankcomputing.com.
- //
- // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- // The implementation of QMatrix4x3.
- class QMatrix4x3
- {
- %TypeHeaderCode
- #include <qgenericmatrix.h>
- %End
- %PickleCode
- PYQT_FLOAT data[12];
- // We want the data in row-major order.
- sipCpp->copyDataTo(data);
- sipRes = Py_BuildValue("dddddddddddd",
- (double)data[0], (double)data[1], (double)data[2],
- (double)data[3], (double)data[4], (double)data[5],
- (double)data[6], (double)data[7], (double)data[8],
- (double)data[9], (double)data[10], (double)data[11]);
- %End
- public:
- QMatrix4x3();
- QMatrix4x3(const QMatrix4x3 &other);
- explicit QMatrix4x3(SIP_PYOBJECT values /TypeHint="Sequence[float]"/);
- %MethodCode
- PYQT_FLOAT values[12];
- if ((sipError = qtgui_matrixDataFromSequence(a0, 12, values)) == sipErrorNone)
- sipCpp = new QMatrix4x3(values);
- %End
- SIP_PYOBJECT __repr__() const /TypeHint="str"/;
- %MethodCode
- bool bad = false;
- int i;
- PyObject *m[12];
- PYQT_FLOAT data[12];
- // The raw data is in column-major order but we want row-major order.
- sipCpp->copyDataTo(data);
- for (i = 0; i < 12; ++i)
- {
- m[i] = PyFloat_FromDouble(data[i]);
- if (!m[i])
- bad = true;
- }
- if (!bad)
- {
- sipRes = PyUnicode_FromFormat("PyQt6.QtGui.QMatrix4x3("
- "%R, %R, %R, "
- "%R, %R, %R, "
- "%R, %R, %R, "
- "%R, %R, %R)",
- m[0], m[1], m[2],
- m[3], m[4], m[5],
- m[6], m[7], m[8],
- m[9], m[10], m[11]);
- }
- for (i = 0; i < 12; ++i)
- Py_XDECREF(m[i]);
- %End
- SIP_PYLIST data() /TypeHint="List[float]"/;
- %MethodCode
- sipError = qtgui_matrixDataAsList(12, sipCpp->constData(), &sipRes);
- %End
- SIP_PYLIST copyDataTo() const /TypeHint="List[float]"/;
- %MethodCode
- PYQT_FLOAT values[12];
- sipCpp->copyDataTo(values);
- sipError = qtgui_matrixDataAsList(12, values, &sipRes);
- %End
- SIP_PYOBJECT __getitem__(SIP_PYOBJECT) const;
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 4, 3, &row, &column)) == sipErrorNone)
- {
- sipRes = PyFloat_FromDouble(sipCpp->operator()(row, column));
- if (!sipRes)
- sipError = sipErrorFail;
- }
- %End
- void __setitem__(SIP_PYOBJECT, float);
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 4, 3, &row, &column)) == sipErrorNone)
- sipCpp->operator()(row, column) = a1;
- %End
- bool isIdentity() const;
- void setToIdentity();
- void fill(float value);
- QMatrix3x4 transposed() const;
- QMatrix4x3 &operator+=(const QMatrix4x3 &);
- QMatrix4x3 &operator-=(const QMatrix4x3 &);
- QMatrix4x3 &operator*=(float);
- QMatrix4x3 &operator/=(float);
- bool operator==(const QMatrix4x3 &) const;
- bool operator!=(const QMatrix4x3 &) const;
- };
- QDataStream &operator<<(QDataStream &, const QMatrix4x3 &) /ReleaseGIL/;
- QDataStream &operator>>(QDataStream &, QMatrix4x3 & /Constrained/) /ReleaseGIL/;
- // The implementation of QMatrix4x2.
- class QMatrix4x2
- {
- %TypeHeaderCode
- #include <qgenericmatrix.h>
- %End
- %PickleCode
- PYQT_FLOAT data[8];
- // We want the data in row-major order.
- sipCpp->copyDataTo(data);
- sipRes = Py_BuildValue("dddddddd",
- (double)data[0], (double)data[1],
- (double)data[2], (double)data[3],
- (double)data[4], (double)data[5],
- (double)data[6], (double)data[7]);
- %End
- public:
- QMatrix4x2();
- QMatrix4x2(const QMatrix4x2 &other);
- explicit QMatrix4x2(SIP_PYOBJECT values /TypeHint="Sequence[float]"/);
- %MethodCode
- PYQT_FLOAT values[8];
- if ((sipError = qtgui_matrixDataFromSequence(a0, 8, values)) == sipErrorNone)
- sipCpp = new QMatrix4x2(values);
- %End
- SIP_PYOBJECT __repr__() const /TypeHint="str"/;
- %MethodCode
- bool bad = false;
- int i;
- PyObject *m[8];
- PYQT_FLOAT data[8];
- // The raw data is in column-major order but we want row-major order.
- sipCpp->copyDataTo(data);
- for (i = 0; i < 8; ++i)
- {
- m[i] = PyFloat_FromDouble(data[i]);
- if (!m[i])
- bad = true;
- }
- if (!bad)
- {
- sipRes = PyUnicode_FromFormat("PyQt6.QtGui.QMatrix4x2("
- "%R, %R, "
- "%R, %R, "
- "%R, %R, "
- "%R, %R)",
- m[0], m[1],
- m[2], m[3],
- m[4], m[5],
- m[6], m[7]);
- }
- for (i = 0; i < 8; ++i)
- Py_XDECREF(m[i]);
- %End
- SIP_PYLIST data() /TypeHint="List[float]"/;
- %MethodCode
- sipError = qtgui_matrixDataAsList(8, sipCpp->constData(), &sipRes);
- %End
- SIP_PYLIST copyDataTo() const /TypeHint="List[float]"/;
- %MethodCode
- PYQT_FLOAT values[8];
- sipCpp->copyDataTo(values);
- sipError = qtgui_matrixDataAsList(8, values, &sipRes);
- %End
- SIP_PYOBJECT __getitem__(SIP_PYOBJECT) const;
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 4, 2, &row, &column)) == sipErrorNone)
- {
- sipRes = PyFloat_FromDouble(sipCpp->operator()(row, column));
- if (!sipRes)
- sipError = sipErrorFail;
- }
- %End
- void __setitem__(SIP_PYOBJECT, float);
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 4, 2, &row, &column)) == sipErrorNone)
- sipCpp->operator()(row, column) = a1;
- %End
- bool isIdentity() const;
- void setToIdentity();
- void fill(float value);
-
- QMatrix2x4 transposed() const;
- QMatrix4x2 &operator+=(const QMatrix4x2 &);
- QMatrix4x2 &operator-=(const QMatrix4x2 &);
- QMatrix4x2 &operator*=(float);
- QMatrix4x2 &operator/=(float);
- bool operator==(const QMatrix4x2 &) const;
- bool operator!=(const QMatrix4x2 &) const;
- };
- QDataStream &operator<<(QDataStream &, const QMatrix4x2 &) /ReleaseGIL/;
- QDataStream &operator>>(QDataStream &, QMatrix4x2 & /Constrained/) /ReleaseGIL/;
- // The implementation of QMatrix3x4.
- class QMatrix3x4
- {
- %TypeHeaderCode
- #include <qgenericmatrix.h>
- %End
- %PickleCode
- PYQT_FLOAT data[12];
- // We want the data in row-major order.
- sipCpp->copyDataTo(data);
- sipRes = Py_BuildValue("dddddddddddd",
- (double)data[0], (double)data[1], (double)data[2],
- (double)data[3], (double)data[4], (double)data[5],
- (double)data[6], (double)data[7], (double)data[8],
- (double)data[9], (double)data[10], (double)data[11]);
- %End
- public:
- QMatrix3x4();
- QMatrix3x4(const QMatrix3x4 &other);
- explicit QMatrix3x4(SIP_PYOBJECT values /TypeHint="Sequence[float]"/);
- %MethodCode
- PYQT_FLOAT values[12];
- if ((sipError = qtgui_matrixDataFromSequence(a0, 12, values)) == sipErrorNone)
- sipCpp = new QMatrix3x4(values);
- %End
- SIP_PYOBJECT __repr__() const /TypeHint="str"/;
- %MethodCode
- bool bad = false;
- int i;
- PyObject *m[12];
- PYQT_FLOAT data[12];
- // The raw data is in column-major order but we want row-major order.
- sipCpp->copyDataTo(data);
- for (i = 0; i < 12; ++i)
- {
- m[i] = PyFloat_FromDouble(data[i]);
- if (!m[i])
- bad = true;
- }
- if (!bad)
- {
- sipRes = PyUnicode_FromFormat("PyQt6.QtGui.QMatrix3x4("
- "%R, %R, %R, "
- "%R, %R, %R, "
- "%R, %R, %R, "
- "%R, %R, %R)",
- m[0], m[1], m[2],
- m[3], m[4], m[5],
- m[6], m[7], m[8],
- m[9], m[10], m[11]);
- }
- for (i = 0; i < 12; ++i)
- Py_XDECREF(m[i]);
- %End
- SIP_PYLIST data() /TypeHint="List[float]"/;
- %MethodCode
- sipError = qtgui_matrixDataAsList(12, sipCpp->constData(), &sipRes);
- %End
- SIP_PYLIST copyDataTo() const /TypeHint="List[float]"/;
- %MethodCode
- PYQT_FLOAT values[12];
- sipCpp->copyDataTo(values);
- sipError = qtgui_matrixDataAsList(12, values, &sipRes);
- %End
- SIP_PYOBJECT __getitem__(SIP_PYOBJECT) const;
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 3, 4, &row, &column)) == sipErrorNone)
- {
- sipRes = PyFloat_FromDouble(sipCpp->operator()(row, column));
- if (!sipRes)
- sipError = sipErrorFail;
- }
- %End
-
- void __setitem__(SIP_PYOBJECT, float);
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 3, 4, &row, &column)) == sipErrorNone)
- sipCpp->operator()(row, column) = a1;
- %End
- bool isIdentity() const;
- void setToIdentity();
- void fill(float value);
-
- QMatrix4x3 transposed() const;
- QMatrix3x4 &operator+=(const QMatrix3x4 &);
- QMatrix3x4 &operator-=(const QMatrix3x4 &);
- QMatrix3x4 &operator*=(float);
- QMatrix3x4 &operator/=(float);
- bool operator==(const QMatrix3x4 &) const;
- bool operator!=(const QMatrix3x4 &) const;
- };
- QDataStream &operator<<(QDataStream &, const QMatrix3x4 &) /ReleaseGIL/;
- QDataStream &operator>>(QDataStream &, QMatrix3x4 & /Constrained/) /ReleaseGIL/;
- // The implementation of QMatrix3x3.
- class QMatrix3x3
- {
- %TypeHeaderCode
- #include <qgenericmatrix.h>
- %End
- %PickleCode
- PYQT_FLOAT data[9];
- // We want the data in row-major order.
- sipCpp->copyDataTo(data);
- sipRes = Py_BuildValue("ddddddddd",
- (double)data[0], (double)data[1], (double)data[2],
- (double)data[3], (double)data[4], (double)data[5],
- (double)data[6], (double)data[7], (double)data[8]);
- %End
- public:
- QMatrix3x3();
- QMatrix3x3(const QMatrix3x3 &other);
- explicit QMatrix3x3(SIP_PYOBJECT values /TypeHint="Sequence[float]"/);
- %MethodCode
- PYQT_FLOAT values[9];
- if ((sipError = qtgui_matrixDataFromSequence(a0, 9, values)) == sipErrorNone)
- sipCpp = new QMatrix3x3(values);
- %End
- SIP_PYOBJECT __repr__() const /TypeHint="str"/;
- %MethodCode
- bool bad = false;
- int i;
- PyObject *m[9];
- PYQT_FLOAT data[9];
- // The raw data is in column-major order but we want row-major order.
- sipCpp->copyDataTo(data);
- for (i = 0; i < 9; ++i)
- {
- m[i] = PyFloat_FromDouble(data[i]);
- if (!m[i])
- bad = true;
- }
- if (!bad)
- {
- sipRes = PyUnicode_FromFormat("PyQt6.QtGui.QMatrix3x3("
- "%R, %R, %R, "
- "%R, %R, %R, "
- "%R, %R, %R)",
- m[0], m[1], m[2],
- m[3], m[4], m[5],
- m[6], m[7], m[8]);
- }
- for (i = 0; i < 9; ++i)
- Py_XDECREF(m[i]);
- %End
- SIP_PYLIST data() /TypeHint="List[float]"/;
- %MethodCode
- sipError = qtgui_matrixDataAsList(9, sipCpp->constData(), &sipRes);
- %End
- SIP_PYLIST copyDataTo() const /TypeHint="List[float]"/;
- %MethodCode
- PYQT_FLOAT values[9];
- sipCpp->copyDataTo(values);
- sipError = qtgui_matrixDataAsList(9, values, &sipRes);
- %End
- SIP_PYOBJECT __getitem__(SIP_PYOBJECT) const;
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 3, 3, &row, &column)) == sipErrorNone)
- {
- sipRes = PyFloat_FromDouble(sipCpp->operator()(row, column));
- if (!sipRes)
- sipError = sipErrorFail;
- }
- %End
-
- void __setitem__(SIP_PYOBJECT, float);
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 3, 3, &row, &column)) == sipErrorNone)
- sipCpp->operator()(row, column) = a1;
- %End
- bool isIdentity() const;
- void setToIdentity();
- void fill(float value);
- QMatrix3x3 transposed() const;
- QMatrix3x3 &operator+=(const QMatrix3x3 &);
- QMatrix3x3 &operator-=(const QMatrix3x3 &);
- QMatrix3x3 &operator*=(float);
- QMatrix3x3 &operator/=(float);
- bool operator==(const QMatrix3x3 &) const;
- bool operator!=(const QMatrix3x3 &) const;
- };
- QDataStream &operator<<(QDataStream &, const QMatrix3x3 &) /ReleaseGIL/;
- QDataStream &operator>>(QDataStream &, QMatrix3x3 & /Constrained/) /ReleaseGIL/;
- // The implementation of QMatrix3x2.
- class QMatrix3x2
- {
- %TypeHeaderCode
- #include <qgenericmatrix.h>
- %End
- %PickleCode
- PYQT_FLOAT data[6];
- // We want the data in row-major order.
- sipCpp->copyDataTo(data);
- sipRes = Py_BuildValue("dddddd",
- (double)data[0], (double)data[1],
- (double)data[2], (double)data[3],
- (double)data[4], (double)data[5]);
- %End
- public:
- QMatrix3x2();
- QMatrix3x2(const QMatrix3x2 &other);
- explicit QMatrix3x2(SIP_PYOBJECT values /TypeHint="Sequence[float]"/);
- %MethodCode
- PYQT_FLOAT values[6];
- if ((sipError = qtgui_matrixDataFromSequence(a0, 6, values)) == sipErrorNone)
- sipCpp = new QMatrix3x2(values);
- %End
- SIP_PYOBJECT __repr__() const /TypeHint="str"/;
- %MethodCode
- bool bad = false;
- int i;
- PyObject *m[6];
- PYQT_FLOAT data[6];
- // The raw data is in column-major order but we want row-major order.
- sipCpp->copyDataTo(data);
- for (i = 0; i < 6; ++i)
- {
- m[i] = PyFloat_FromDouble(data[i]);
- if (!m[i])
- bad = true;
- }
- if (!bad)
- {
- sipRes = PyUnicode_FromFormat("PyQt6.QtGui.QMatrix3x2("
- "%R, %R, "
- "%R, %R, "
- "%R, %R)",
- m[0], m[1],
- m[2], m[3],
- m[4], m[5]);
- }
- for (i = 0; i < 6; ++i)
- Py_XDECREF(m[i]);
- %End
- SIP_PYLIST data() /TypeHint="List[float]"/;
- %MethodCode
- sipError = qtgui_matrixDataAsList(6, sipCpp->constData(), &sipRes);
- %End
- SIP_PYLIST copyDataTo() const /TypeHint="List[float]"/;
- %MethodCode
- PYQT_FLOAT values[6];
- sipCpp->copyDataTo(values);
- sipError = qtgui_matrixDataAsList(6, values, &sipRes);
- %End
- SIP_PYOBJECT __getitem__(SIP_PYOBJECT) const;
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 3, 2, &row, &column)) == sipErrorNone)
- {
- sipRes = PyFloat_FromDouble(sipCpp->operator()(row, column));
- if (!sipRes)
- sipError = sipErrorFail;
- }
- %End
- void __setitem__(SIP_PYOBJECT, float);
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 3, 2, &row, &column)) == sipErrorNone)
- sipCpp->operator()(row, column) = a1;
- %End
- bool isIdentity() const;
- void setToIdentity();
- void fill(float value);
- QMatrix2x3 transposed() const;
- QMatrix3x2 &operator+=(const QMatrix3x2 &);
- QMatrix3x2 &operator-=(const QMatrix3x2 &);
- QMatrix3x2 &operator*=(float);
- QMatrix3x2 &operator/=(float);
- bool operator==(const QMatrix3x2 &) const;
- bool operator!=(const QMatrix3x2 &) const;
- };
- QDataStream &operator<<(QDataStream &, const QMatrix3x2 &) /ReleaseGIL/;
- QDataStream &operator>>(QDataStream &, QMatrix3x2 & /Constrained/) /ReleaseGIL/;
- // The implementation of QMatrix2x4.
- class QMatrix2x4
- {
- %TypeHeaderCode
- #include <qgenericmatrix.h>
- %End
- %PickleCode
- PYQT_FLOAT data[8];
- // We want the data in row-major order.
- sipCpp->copyDataTo(data);
- sipRes = Py_BuildValue("dddddddd",
- (double)data[0], (double)data[1], (double)data[2], (double)data[3],
- (double)data[4], (double)data[5], (double)data[6], (double)data[7]);
- %End
- public:
- QMatrix2x4();
- QMatrix2x4(const QMatrix2x4 &other);
- explicit QMatrix2x4(SIP_PYOBJECT values /TypeHint="Sequence[float]"/);
- %MethodCode
- PYQT_FLOAT values[8];
- if ((sipError = qtgui_matrixDataFromSequence(a0, 8, values)) == sipErrorNone)
- sipCpp = new QMatrix2x4(values);
- %End
- SIP_PYOBJECT __repr__() const /TypeHint="str"/;
- %MethodCode
- bool bad = false;
- int i;
- PyObject *m[8];
- PYQT_FLOAT data[8];
- // The raw data is in column-major order but we want row-major order.
- sipCpp->copyDataTo(data);
- for (i = 0; i < 8; ++i)
- {
- m[i] = PyFloat_FromDouble(data[i]);
- if (!m[i])
- bad = true;
- }
- if (!bad)
- {
- sipRes = PyUnicode_FromFormat("PyQt6.QtGui.QMatrix2x4("
- "%R, %R, %R, %R, "
- "%R, %R, %R, %R)",
- m[0], m[1], m[2], m[3],
- m[4], m[5], m[6], m[7]);
- }
- for (i = 0; i < 8; ++i)
- Py_XDECREF(m[i]);
- %End
- SIP_PYLIST data() /TypeHint="List[float]"/;
- %MethodCode
- sipError = qtgui_matrixDataAsList(8, sipCpp->constData(), &sipRes);
- %End
- SIP_PYLIST copyDataTo() const /TypeHint="List[float]"/;
- %MethodCode
- PYQT_FLOAT values[8];
- sipCpp->copyDataTo(values);
- sipError = qtgui_matrixDataAsList(8, values, &sipRes);
- %End
- SIP_PYOBJECT __getitem__(SIP_PYOBJECT) const;
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 2, 4, &row, &column)) == sipErrorNone)
- {
- sipRes = PyFloat_FromDouble(sipCpp->operator()(row, column));
- if (!sipRes)
- sipError = sipErrorFail;
- }
- %End
-
- void __setitem__(SIP_PYOBJECT, float);
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 2, 4, &row, &column)) == sipErrorNone)
- sipCpp->operator()(row, column) = a1;
- %End
- bool isIdentity() const;
- void setToIdentity();
- void fill(float value);
- QMatrix4x2 transposed() const;
- QMatrix2x4 &operator+=(const QMatrix2x4 &);
- QMatrix2x4 &operator-=(const QMatrix2x4 &);
- QMatrix2x4 &operator*=(float);
- QMatrix2x4 &operator/=(float);
- bool operator==(const QMatrix2x4 &) const;
- bool operator!=(const QMatrix2x4 &) const;
- };
- QDataStream &operator<<(QDataStream &, const QMatrix2x4 &) /ReleaseGIL/;
- QDataStream &operator>>(QDataStream &, QMatrix2x4 & /Constrained/) /ReleaseGIL/;
- // The implementation of QMatrix2x3.
- class QMatrix2x3
- {
- %TypeHeaderCode
- #include <qgenericmatrix.h>
- %End
- %PickleCode
- PYQT_FLOAT data[6];
- // We want the data in row-major order.
- sipCpp->copyDataTo(data);
- sipRes = Py_BuildValue("dddddd",
- (double)data[0], (double)data[1], (double)data[2],
- (double)data[3], (double)data[4], (double)data[5]);
- %End
- public:
- QMatrix2x3();
- QMatrix2x3(const QMatrix2x3 &other);
- explicit QMatrix2x3(SIP_PYOBJECT values /TypeHint="Sequence[float]"/);
- %MethodCode
- PYQT_FLOAT values[6];
- if ((sipError = qtgui_matrixDataFromSequence(a0, 6, values)) == sipErrorNone)
- sipCpp = new QMatrix2x3(values);
- %End
- SIP_PYOBJECT __repr__() const /TypeHint="str"/;
- %MethodCode
- bool bad = false;
- int i;
- PyObject *m[6];
- PYQT_FLOAT data[6];
- // The raw data is in column-major order but we want row-major order.
- sipCpp->copyDataTo(data);
- for (i = 0; i < 6; ++i)
- {
- m[i] = PyFloat_FromDouble(data[i]);
- if (!m[i])
- bad = true;
- }
- if (!bad)
- {
- sipRes = PyUnicode_FromFormat("PyQt6.QtGui.QMatrix2x3("
- "%R, %R, %R, "
- "%R, %R, %R)",
- m[0], m[1], m[2],
- m[3], m[4], m[5]);
- }
- for (i = 0; i < 6; ++i)
- Py_XDECREF(m[i]);
- %End
- SIP_PYLIST data() /TypeHint="List[float]"/;
- %MethodCode
- sipError = qtgui_matrixDataAsList(6, sipCpp->constData(), &sipRes);
- %End
- SIP_PYLIST copyDataTo() const /TypeHint="List[float]"/;
- %MethodCode
- PYQT_FLOAT values[6];
- sipCpp->copyDataTo(values);
- sipError = qtgui_matrixDataAsList(6, values, &sipRes);
- %End
- SIP_PYOBJECT __getitem__(SIP_PYOBJECT) const;
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 2, 3, &row, &column)) == sipErrorNone)
- {
- sipRes = PyFloat_FromDouble(sipCpp->operator()(row, column));
- if (!sipRes)
- sipError = sipErrorFail;
- }
- %End
-
- void __setitem__(SIP_PYOBJECT, float);
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 2, 3, &row, &column)) == sipErrorNone)
- sipCpp->operator()(row, column) = a1;
- %End
- bool isIdentity() const;
- void setToIdentity();
- void fill(float value);
- QMatrix3x2 transposed() const;
- QMatrix2x3 &operator+=(const QMatrix2x3 &);
- QMatrix2x3 &operator-=(const QMatrix2x3 &);
- QMatrix2x3 &operator*=(float);
- QMatrix2x3 &operator/=(float);
- bool operator==(const QMatrix2x3 &) const;
- bool operator!=(const QMatrix2x3 &) const;
- };
- QDataStream &operator<<(QDataStream &, const QMatrix2x3 &) /ReleaseGIL/;
- QDataStream &operator>>(QDataStream &, QMatrix2x3 & /Constrained/) /ReleaseGIL/;
- // The implementation of QMatrix2x2.
- class QMatrix2x2
- {
- %TypeHeaderCode
- #include <qgenericmatrix.h>
- %End
- %PickleCode
- PYQT_FLOAT data[4];
- // We want the data in row-major order.
- sipCpp->copyDataTo(data);
- sipRes = Py_BuildValue("dddd",
- (double)data[0], (double)data[1],
- (double)data[2], (double)data[3]);
- %End
- public:
- QMatrix2x2();
- QMatrix2x2(const QMatrix2x2 &other);
- explicit QMatrix2x2(SIP_PYOBJECT values /TypeHint="Sequence[float]"/);
- %MethodCode
- PYQT_FLOAT values[4];
- if ((sipError = qtgui_matrixDataFromSequence(a0, 4, values)) == sipErrorNone)
- sipCpp = new QMatrix2x2(values);
- %End
- SIP_PYOBJECT __repr__() const /TypeHint="str"/;
- %MethodCode
- bool bad = false;
- int i;
- PyObject *m[4];
- PYQT_FLOAT data[4];
- // The raw data is in column-major order but we want row-major order.
- sipCpp->copyDataTo(data);
- for (i = 0; i < 4; ++i)
- {
- m[i] = PyFloat_FromDouble(data[i]);
- if (!m[i])
- bad = true;
- }
- if (!bad)
- {
- sipRes = PyUnicode_FromFormat("PyQt6.QtGui.QMatrix2x2("
- "%R, %R, "
- "%R, %R)",
- m[0], m[1],
- m[2], m[3]);
- }
- for (i = 0; i < 4; ++i)
- Py_XDECREF(m[i]);
- %End
- SIP_PYLIST data() /TypeHint="List[float]"/;
- %MethodCode
- sipError = qtgui_matrixDataAsList(4, sipCpp->constData(), &sipRes);
- %End
- SIP_PYLIST copyDataTo() const /TypeHint="List[float]"/;
- %MethodCode
- PYQT_FLOAT values[4];
- sipCpp->copyDataTo(values);
- sipError = qtgui_matrixDataAsList(4, values, &sipRes);
- %End
- SIP_PYOBJECT __getitem__(SIP_PYOBJECT) const;
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 2, 2, &row, &column)) == sipErrorNone)
- {
- sipRes = PyFloat_FromDouble(sipCpp->operator()(row, column));
- if (!sipRes)
- sipError = sipErrorFail;
- }
- %End
-
- void __setitem__(SIP_PYOBJECT, float);
- %MethodCode
- int row, column;
- if ((sipError = qtgui_matrixParseIndex(a0, 2, 2, &row, &column)) == sipErrorNone)
- sipCpp->operator()(row, column) = a1;
- %End
- bool isIdentity() const;
- void setToIdentity();
- void fill(float value);
- QMatrix2x2 transposed() const;
- QMatrix2x2 &operator+=(const QMatrix2x2 &);
- QMatrix2x2 &operator-=(const QMatrix2x2 &);
- QMatrix2x2 &operator*=(float);
- QMatrix2x2 &operator/=(float);
- bool operator==(const QMatrix2x2 &) const;
- bool operator!=(const QMatrix2x2 &) const;
- };
- QDataStream &operator<<(QDataStream &, const QMatrix2x2 &) /ReleaseGIL/;
- QDataStream &operator>>(QDataStream &, QMatrix2x2 & /Constrained/) /ReleaseGIL/;
|