2024-08-25 04:08:24 +00:00
|
|
|
#include <QPoint>
|
|
|
|
#include <QPointF>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qpoint.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qpoint.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPoint* QPoint_new() {
|
|
|
|
return new QPoint();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPoint* QPoint_new2(int xpos, int ypos) {
|
|
|
|
return new QPoint(static_cast<int>(xpos), static_cast<int>(ypos));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPoint* QPoint_new3(QPoint* param1) {
|
|
|
|
return new QPoint(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPoint_IsNull(const QPoint* self) {
|
|
|
|
return self->isNull();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPoint_X(const QPoint* self) {
|
|
|
|
return self->x();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPoint_Y(const QPoint* self) {
|
|
|
|
return self->y();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPoint_SetX(QPoint* self, int x) {
|
|
|
|
self->setX(static_cast<int>(x));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPoint_SetY(QPoint* self, int y) {
|
|
|
|
self->setY(static_cast<int>(y));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPoint_ManhattanLength(const QPoint* self) {
|
|
|
|
return self->manhattanLength();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QPoint_Transposed(const QPoint* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPoint(self->transposed());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPoint* QPoint_OperatorPlusAssign(QPoint* self, QPoint* p) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPoint& _ret = self->operator+=(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPoint* QPoint_OperatorMinusAssign(QPoint* self, QPoint* p) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPoint& _ret = self->operator-=(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPoint* QPoint_OperatorMultiplyAssign(QPoint* self, float factor) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPoint& _ret = self->operator*=(static_cast<float>(factor));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPoint* QPoint_OperatorMultiplyAssignWithFactor(QPoint* self, double factor) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPoint& _ret = self->operator*=(static_cast<double>(factor));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPoint* QPoint_OperatorMultiplyAssign2(QPoint* self, int factor) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPoint& _ret = self->operator*=(static_cast<int>(factor));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPoint* QPoint_OperatorDivideAssign(QPoint* self, double divisor) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPoint& _ret = self->operator/=(static_cast<qreal>(divisor));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QPoint_DotProduct(QPoint* p1, QPoint* p2) {
|
|
|
|
return QPoint::dotProduct(*p1, *p2);
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPoint_Delete(QPoint* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QPoint*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPointF* QPointF_new() {
|
|
|
|
return new QPointF();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPointF* QPointF_new2(QPoint* p) {
|
|
|
|
return new QPointF(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPointF* QPointF_new3(double xpos, double ypos) {
|
|
|
|
return new QPointF(static_cast<qreal>(xpos), static_cast<qreal>(ypos));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPointF* QPointF_new4(QPointF* param1) {
|
|
|
|
return new QPointF(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QPointF_ManhattanLength(const QPointF* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->manhattanLength();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPointF_IsNull(const QPointF* self) {
|
|
|
|
return self->isNull();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QPointF_X(const QPointF* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->x();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QPointF_Y(const QPointF* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->y();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPointF_SetX(QPointF* self, double x) {
|
|
|
|
self->setX(static_cast<qreal>(x));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPointF_SetY(QPointF* self, double y) {
|
|
|
|
self->setY(static_cast<qreal>(y));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPointF* QPointF_Transposed(const QPointF* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPointF(self->transposed());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPointF* QPointF_OperatorPlusAssign(QPointF* self, QPointF* p) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPointF& _ret = self->operator+=(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPointF* QPointF_OperatorMinusAssign(QPointF* self, QPointF* p) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPointF& _ret = self->operator-=(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPointF* QPointF_OperatorMultiplyAssign(QPointF* self, double c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPointF& _ret = self->operator*=(static_cast<qreal>(c));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPointF* QPointF_OperatorDivideAssign(QPointF* self, double c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPointF& _ret = self->operator/=(static_cast<qreal>(c));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QPointF_DotProduct(QPointF* p1, QPointF* p2) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = QPointF::dotProduct(*p1, *p2);
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QPointF_ToPoint(const QPointF* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPoint(self->toPoint());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPointF_Delete(QPointF* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QPointF*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|