2024-08-25 04:08:24 +00:00
|
|
|
#include <QLine>
|
|
|
|
#include <QLineF>
|
|
|
|
#include <QMatrix>
|
|
|
|
#include <QPainterPath>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QPointF>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QRectF>
|
|
|
|
#include <QRegion>
|
|
|
|
#include <QTransform>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qtransform.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qtransform.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QTransform* QTransform_new(uintptr_t param1) {
|
|
|
|
return new QTransform(static_cast<Qt::Initialization>(param1));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_new2() {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QTransform();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QTransform* QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QTransform(static_cast<qreal>(h11), static_cast<qreal>(h12), static_cast<qreal>(h13), static_cast<qreal>(h21), static_cast<qreal>(h22), static_cast<qreal>(h23), static_cast<qreal>(h31), static_cast<qreal>(h32));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QTransform* QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QTransform(static_cast<qreal>(h11), static_cast<qreal>(h12), static_cast<qreal>(h21), static_cast<qreal>(h22), static_cast<qreal>(dx), static_cast<qreal>(dy));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QTransform* QTransform_new5(QMatrix* mtx) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QTransform(*mtx);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QTransform* QTransform_new6(QTransform* other) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QTransform(*other);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QTransform* QTransform_new7(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QTransform(static_cast<qreal>(h11), static_cast<qreal>(h12), static_cast<qreal>(h13), static_cast<qreal>(h21), static_cast<qreal>(h22), static_cast<qreal>(h23), static_cast<qreal>(h31), static_cast<qreal>(h32), static_cast<qreal>(h33));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTransform_OperatorAssign(QTransform* self, QTransform* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTransform_IsAffine(const QTransform* self) {
|
|
|
|
return self->isAffine();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTransform_IsIdentity(const QTransform* self) {
|
|
|
|
return self->isIdentity();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTransform_IsInvertible(const QTransform* self) {
|
|
|
|
return self->isInvertible();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTransform_IsScaling(const QTransform* self) {
|
|
|
|
return self->isScaling();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTransform_IsRotating(const QTransform* self) {
|
|
|
|
return self->isRotating();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTransform_IsTranslating(const QTransform* self) {
|
|
|
|
return self->isTranslating();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QTransform_Type(const QTransform* self) {
|
|
|
|
QTransform::TransformationType ret = self->type();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_Determinant(const QTransform* self) {
|
|
|
|
return self->determinant();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_Det(const QTransform* self) {
|
|
|
|
return self->det();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_M11(const QTransform* self) {
|
|
|
|
return self->m11();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_M12(const QTransform* self) {
|
|
|
|
return self->m12();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_M13(const QTransform* self) {
|
|
|
|
return self->m13();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_M21(const QTransform* self) {
|
|
|
|
return self->m21();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_M22(const QTransform* self) {
|
|
|
|
return self->m22();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_M23(const QTransform* self) {
|
|
|
|
return self->m23();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_M31(const QTransform* self) {
|
|
|
|
return self->m31();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_M32(const QTransform* self) {
|
|
|
|
return self->m32();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_M33(const QTransform* self) {
|
|
|
|
return self->m33();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_Dx(const QTransform* self) {
|
|
|
|
return self->dx();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTransform_Dy(const QTransform* self) {
|
|
|
|
return self->dy();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTransform_SetMatrix(QTransform* self, double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33) {
|
|
|
|
self->setMatrix(static_cast<qreal>(m11), static_cast<qreal>(m12), static_cast<qreal>(m13), static_cast<qreal>(m21), static_cast<qreal>(m22), static_cast<qreal>(m23), static_cast<qreal>(m31), static_cast<qreal>(m32), static_cast<qreal>(m33));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTransform* QTransform_Inverted(const QTransform* self) {
|
|
|
|
QTransform ret = self->inverted();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QTransform*>(new QTransform(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTransform* QTransform_Adjoint(const QTransform* self) {
|
|
|
|
QTransform ret = self->adjoint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QTransform*>(new QTransform(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTransform* QTransform_Transposed(const QTransform* self) {
|
|
|
|
QTransform ret = self->transposed();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QTransform*>(new QTransform(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_Translate(QTransform* self, double dx, double dy) {
|
|
|
|
QTransform& ret = self->translate(static_cast<qreal>(dx), static_cast<qreal>(dy));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_Scale(QTransform* self, double sx, double sy) {
|
|
|
|
QTransform& ret = self->scale(static_cast<qreal>(sx), static_cast<qreal>(sy));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_Shear(QTransform* self, double sh, double sv) {
|
|
|
|
QTransform& ret = self->shear(static_cast<qreal>(sh), static_cast<qreal>(sv));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QTransform* QTransform_Rotate(QTransform* self, double a) {
|
|
|
|
QTransform& ret = self->rotate(static_cast<qreal>(a));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_RotateRadians(QTransform* self, double a) {
|
|
|
|
QTransform& ret = self->rotateRadians(static_cast<qreal>(a));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTransform_OperatorEqual(const QTransform* self, QTransform* param1) {
|
|
|
|
return self->operator==(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTransform_OperatorNotEqual(const QTransform* self, QTransform* param1) {
|
|
|
|
return self->operator!=(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_OperatorMultiplyAssign(QTransform* self, QTransform* param1) {
|
|
|
|
QTransform& ret = self->operator*=(*param1);
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTransform* QTransform_OperatorMultiply(const QTransform* self, QTransform* o) {
|
|
|
|
QTransform ret = self->operator*(*o);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QTransform*>(new QTransform(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTransform_Reset(QTransform* self) {
|
|
|
|
self->reset();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QTransform_Map(const QTransform* self, QPoint* p) {
|
|
|
|
QPoint ret = self->map(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPoint*>(new QPoint(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPointF* QTransform_MapWithQPointF(const QTransform* self, QPointF* p) {
|
|
|
|
QPointF ret = self->map(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPointF*>(new QPointF(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QLine* QTransform_MapWithQLine(const QTransform* self, QLine* l) {
|
|
|
|
QLine ret = self->map(*l);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QLine*>(new QLine(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QLineF* QTransform_MapWithQLineF(const QTransform* self, QLineF* l) {
|
|
|
|
QLineF ret = self->map(*l);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QLineF*>(new QLineF(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRegion* QTransform_MapWithQRegion(const QTransform* self, QRegion* r) {
|
|
|
|
QRegion ret = self->map(*r);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRegion*>(new QRegion(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPainterPath* QTransform_MapWithQPainterPath(const QTransform* self, QPainterPath* p) {
|
|
|
|
QPainterPath ret = self->map(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPainterPath*>(new QPainterPath(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QTransform_MapRect(const QTransform* self, QRect* param1) {
|
|
|
|
QRect ret = self->mapRect(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRectF* QTransform_MapRectWithQRectF(const QTransform* self, QRectF* param1) {
|
|
|
|
QRectF ret = self->mapRect(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRectF*>(new QRectF(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QTransform_Map2(const QTransform* self, int x, int y, int* tx, int* ty) {
|
|
|
|
self->map(static_cast<int>(x), static_cast<int>(y), static_cast<int*>(tx), static_cast<int*>(ty));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QTransform_Map3(const QTransform* self, double x, double y, double* tx, double* ty) {
|
|
|
|
self->map(static_cast<qreal>(x), static_cast<qreal>(y), static_cast<qreal*>(tx), static_cast<qreal*>(ty));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMatrix* QTransform_ToAffine(const QTransform* self) {
|
|
|
|
const QMatrix& ret = self->toAffine();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
|
|
|
return const_cast<QMatrix*>(&ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_OperatorMultiplyAssignWithDiv(QTransform* self, double div) {
|
|
|
|
QTransform& ret = self->operator*=(static_cast<qreal>(div));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_OperatorDivideAssign(QTransform* self, double div) {
|
|
|
|
QTransform& ret = self->operator/=(static_cast<qreal>(div));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_OperatorPlusAssign(QTransform* self, double div) {
|
|
|
|
QTransform& ret = self->operator+=(static_cast<qreal>(div));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_OperatorMinusAssign(QTransform* self, double div) {
|
|
|
|
QTransform& ret = self->operator-=(static_cast<qreal>(div));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_FromTranslate(double dx, double dy) {
|
|
|
|
QTransform ret = QTransform::fromTranslate(static_cast<qreal>(dx), static_cast<qreal>(dy));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QTransform*>(new QTransform(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_FromScale(double dx, double dy) {
|
|
|
|
QTransform ret = QTransform::fromScale(static_cast<qreal>(dx), static_cast<qreal>(dy));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QTransform*>(new QTransform(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTransform* QTransform_Inverted1(const QTransform* self, bool* invertible) {
|
|
|
|
QTransform ret = self->inverted(invertible);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QTransform*>(new QTransform(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QTransform* QTransform_Rotate2(QTransform* self, double a, uintptr_t axis) {
|
|
|
|
QTransform& ret = self->rotate(static_cast<qreal>(a), static_cast<Qt::Axis>(axis));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTransform* QTransform_RotateRadians2(QTransform* self, double a, uintptr_t axis) {
|
|
|
|
QTransform& ret = self->rotateRadians(static_cast<qreal>(a), static_cast<Qt::Axis>(axis));
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
return &ret;
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QTransform_Delete(QTransform* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|