2024-08-25 04:08:24 +00:00
|
|
|
#include <QBitmap>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QColor>
|
|
|
|
#include <QIODevice>
|
|
|
|
#include <QImage>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QImageReader>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QMatrix>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QPaintDevice>
|
|
|
|
#include <QPaintEngine>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QPainter>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QPixmap>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QRegion>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QTransform>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qpixmap.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qpixmap.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
class MiqtVirtualQPixmap : public virtual QPixmap {
|
|
|
|
public:
|
|
|
|
|
|
|
|
MiqtVirtualQPixmap(): QPixmap() {};
|
|
|
|
MiqtVirtualQPixmap(int w, int h): QPixmap(w, h) {};
|
|
|
|
MiqtVirtualQPixmap(const QSize& param1): QPixmap(param1) {};
|
|
|
|
MiqtVirtualQPixmap(const QString& fileName): QPixmap(fileName) {};
|
|
|
|
MiqtVirtualQPixmap(const QPixmap& param1): QPixmap(param1) {};
|
|
|
|
MiqtVirtualQPixmap(const QString& fileName, const char* format): QPixmap(fileName, format) {};
|
|
|
|
MiqtVirtualQPixmap(const QString& fileName, const char* format, Qt::ImageConversionFlags flags): QPixmap(fileName, format, flags) {};
|
|
|
|
|
|
|
|
virtual ~MiqtVirtualQPixmap() = default;
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__DevType = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual int devType() const override {
|
|
|
|
if (handle__DevType == 0) {
|
|
|
|
return QPixmap::devType();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int callback_return_value = miqt_exec_callback_QPixmap_DevType(const_cast<MiqtVirtualQPixmap*>(this), handle__DevType);
|
|
|
|
|
|
|
|
return static_cast<int>(callback_return_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
int virtualbase_DevType() const {
|
|
|
|
|
|
|
|
return QPixmap::devType();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__PaintEngine = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual QPaintEngine* paintEngine() const override {
|
|
|
|
if (handle__PaintEngine == 0) {
|
|
|
|
return QPixmap::paintEngine();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QPaintEngine* callback_return_value = miqt_exec_callback_QPixmap_PaintEngine(const_cast<MiqtVirtualQPixmap*>(this), handle__PaintEngine);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QPaintEngine* virtualbase_PaintEngine() const {
|
|
|
|
|
|
|
|
return QPixmap::paintEngine();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Metric = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override {
|
|
|
|
if (handle__Metric == 0) {
|
|
|
|
return QPixmap::metric(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintDevice::PaintDeviceMetric param1_ret = param1;
|
|
|
|
int sigval1 = static_cast<int>(param1_ret);
|
|
|
|
|
|
|
|
int callback_return_value = miqt_exec_callback_QPixmap_Metric(const_cast<MiqtVirtualQPixmap*>(this), handle__Metric, sigval1);
|
|
|
|
|
|
|
|
return static_cast<int>(callback_return_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
int virtualbase_Metric(int param1) const {
|
|
|
|
|
|
|
|
return QPixmap::metric(static_cast<QPaintDevice::PaintDeviceMetric>(param1));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__InitPainter = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual void initPainter(QPainter* painter) const override {
|
|
|
|
if (handle__InitPainter == 0) {
|
|
|
|
QPixmap::initPainter(painter);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPainter* sigval1 = painter;
|
|
|
|
|
|
|
|
miqt_exec_callback_QPixmap_InitPainter(const_cast<MiqtVirtualQPixmap*>(this), handle__InitPainter, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_InitPainter(QPainter* painter) const {
|
|
|
|
|
|
|
|
QPixmap::initPainter(painter);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Redirected = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual QPaintDevice* redirected(QPoint* offset) const override {
|
|
|
|
if (handle__Redirected == 0) {
|
|
|
|
return QPixmap::redirected(offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPoint* sigval1 = offset;
|
|
|
|
|
|
|
|
QPaintDevice* callback_return_value = miqt_exec_callback_QPixmap_Redirected(const_cast<MiqtVirtualQPixmap*>(this), handle__Redirected, sigval1);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QPaintDevice* virtualbase_Redirected(QPoint* offset) const {
|
|
|
|
|
|
|
|
return QPixmap::redirected(offset);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__SharedPainter = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual QPainter* sharedPainter() const override {
|
|
|
|
if (handle__SharedPainter == 0) {
|
|
|
|
return QPixmap::sharedPainter();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QPainter* callback_return_value = miqt_exec_callback_QPixmap_SharedPainter(const_cast<MiqtVirtualQPixmap*>(this), handle__SharedPainter);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QPainter* virtualbase_SharedPainter() const {
|
|
|
|
|
|
|
|
return QPixmap::sharedPainter();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
void QPixmap_new(QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) {
|
|
|
|
MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap();
|
|
|
|
*outptr_QPixmap = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPixmap_new2(int w, int h, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) {
|
|
|
|
MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(static_cast<int>(w), static_cast<int>(h));
|
|
|
|
*outptr_QPixmap = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPixmap_new3(QSize* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) {
|
|
|
|
MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1);
|
|
|
|
*outptr_QPixmap = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPixmap_new4(struct miqt_string fileName, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-11-19 06:29:06 +00:00
|
|
|
MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString);
|
|
|
|
*outptr_QPixmap = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPixmap_new5(QPixmap* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) {
|
|
|
|
MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1);
|
|
|
|
*outptr_QPixmap = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPixmap_new6(struct miqt_string fileName, const char* format, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-11-19 06:29:06 +00:00
|
|
|
MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format);
|
|
|
|
*outptr_QPixmap = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPixmap_new7(struct miqt_string fileName, const char* format, int flags, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-11-19 06:29:06 +00:00
|
|
|
MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format, static_cast<Qt::ImageConversionFlags>(flags));
|
|
|
|
*outptr_QPixmap = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Swap(QPixmap* self, QPixmap* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPixmap_IsNull(const QPixmap* self) {
|
|
|
|
return self->isNull();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPixmap_DevType(const QPixmap* self) {
|
|
|
|
return self->devType();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPixmap_Width(const QPixmap* self) {
|
|
|
|
return self->width();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPixmap_Height(const QPixmap* self) {
|
|
|
|
return self->height();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QPixmap_Size(const QPixmap* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->size());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QPixmap_Rect(const QPixmap* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->rect());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPixmap_Depth(const QPixmap* self) {
|
|
|
|
return self->depth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QPixmap_DefaultDepth() {
|
|
|
|
return QPixmap::defaultDepth();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Fill(QPixmap* self) {
|
|
|
|
self->fill();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Fill2(QPixmap* self, QPaintDevice* device, QPoint* ofs) {
|
|
|
|
self->fill(device, *ofs);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Fill3(QPixmap* self, QPaintDevice* device, int xofs, int yofs) {
|
|
|
|
self->fill(device, static_cast<int>(xofs), static_cast<int>(yofs));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBitmap* QPixmap_Mask(const QPixmap* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(self->mask());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_SetMask(QPixmap* self, QBitmap* mask) {
|
|
|
|
self->setMask(*mask);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QPixmap_DevicePixelRatio(const QPixmap* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->devicePixelRatio();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_SetDevicePixelRatio(QPixmap* self, double scaleFactor) {
|
|
|
|
self->setDevicePixelRatio(static_cast<qreal>(scaleFactor));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPixmap_HasAlpha(const QPixmap* self) {
|
|
|
|
return self->hasAlpha();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPixmap_HasAlphaChannel(const QPixmap* self) {
|
|
|
|
return self->hasAlphaChannel();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBitmap* QPixmap_CreateHeuristicMask(const QPixmap* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(self->createHeuristicMask());
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBitmap* QPixmap_CreateMaskFromColor(const QPixmap* self, QColor* maskColor) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(self->createMaskFromColor(*maskColor));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWindow(uintptr_t param1) {
|
2024-09-18 00:12:02 +00:00
|
|
|
return new QPixmap(QPixmap::grabWindow(static_cast<WId>(param1)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWidget(QObject* widget, QRect* rect) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::grabWidget(widget, *rect));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWidgetWithWidget(QObject* widget) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::grabWidget(widget));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QPixmap_Scaled(const QPixmap* self, int w, int h) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaled(static_cast<int>(w), static_cast<int>(h)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QPixmap_ScaledWithQSize(const QPixmap* self, QSize* s) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaled(*s));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QPixmap_ScaledToWidth(const QPixmap* self, int w) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaledToWidth(static_cast<int>(w)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QPixmap_ScaledToHeight(const QPixmap* self, int h) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaledToHeight(static_cast<int>(h)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QPixmap_Transformed(const QPixmap* self, QMatrix* param1) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->transformed(*param1));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QMatrix* QPixmap_TrueMatrix(QMatrix* m, int w, int h) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMatrix(QPixmap::trueMatrix(*m, static_cast<int>(w), static_cast<int>(h)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QPixmap_TransformedWithQTransform(const QPixmap* self, QTransform* param1) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->transformed(*param1));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QTransform* QPixmap_TrueMatrix2(QTransform* m, int w, int h) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QTransform(QPixmap::trueMatrix(*m, static_cast<int>(w), static_cast<int>(h)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QImage* QPixmap_ToImage(const QPixmap* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QImage(self->toImage());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QPixmap* QPixmap_FromImage(QImage* image) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::fromImage(*image));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_FromImageReader(QImageReader* imageReader) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::fromImageReader(imageReader));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPixmap_Load(QPixmap* self, struct miqt_string fileName) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-08-29 07:01:51 +00:00
|
|
|
return self->load(fileName_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPixmap_LoadFromData(QPixmap* self, const unsigned char* buf, unsigned int lenVal) {
|
|
|
|
return self->loadFromData(static_cast<const uchar*>(buf), static_cast<uint>(lenVal));
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPixmap_LoadFromDataWithData(QPixmap* self, struct miqt_string data) {
|
|
|
|
QByteArray data_QByteArray(data.data, data.len);
|
|
|
|
return self->loadFromData(data_QByteArray);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPixmap_Save(const QPixmap* self, struct miqt_string fileName) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-09-11 05:41:09 +00:00
|
|
|
return self->save(fileName_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPixmap_SaveWithDevice(const QPixmap* self, QIODevice* device) {
|
|
|
|
return self->save(device);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QPixmap_ConvertFromImage(QPixmap* self, QImage* img) {
|
|
|
|
return self->convertFromImage(*img);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QPixmap_Copy(const QPixmap* self, int x, int y, int width, int height) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->copy(static_cast<int>(x), static_cast<int>(y), static_cast<int>(width), static_cast<int>(height)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QPixmap_Copy2(const QPixmap* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->copy());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Scroll(QPixmap* self, int dx, int dy, int x, int y, int width, int height) {
|
|
|
|
self->scroll(static_cast<int>(dx), static_cast<int>(dy), static_cast<int>(x), static_cast<int>(y), static_cast<int>(width), static_cast<int>(height));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Scroll2(QPixmap* self, int dx, int dy, QRect* rect) {
|
|
|
|
self->scroll(static_cast<int>(dx), static_cast<int>(dy), *rect);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QPixmap_CacheKey(const QPixmap* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qint64 _ret = self->cacheKey();
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPixmap_IsDetached(const QPixmap* self) {
|
|
|
|
return self->isDetached();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Detach(QPixmap* self) {
|
|
|
|
self->detach();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPixmap_IsQBitmap(const QPixmap* self) {
|
|
|
|
return self->isQBitmap();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPaintEngine* QPixmap_PaintEngine(const QPixmap* self) {
|
|
|
|
return self->paintEngine();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPixmap_OperatorNot(const QPixmap* self) {
|
|
|
|
return self->operator!();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Fill1(QPixmap* self, QColor* fillColor) {
|
|
|
|
self->fill(*fillColor);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBitmap* QPixmap_CreateHeuristicMask1(const QPixmap* self, bool clipTight) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(self->createHeuristicMask(clipTight));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QBitmap* QPixmap_CreateMaskFromColor2(const QPixmap* self, QColor* maskColor, int mode) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(self->createMaskFromColor(*maskColor, static_cast<Qt::MaskMode>(mode)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QPixmap* QPixmap_GrabWindow2(uintptr_t param1, int x) {
|
2024-09-18 00:12:02 +00:00
|
|
|
return new QPixmap(QPixmap::grabWindow(static_cast<WId>(param1), static_cast<int>(x)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWindow3(uintptr_t param1, int x, int y) {
|
2024-09-18 00:12:02 +00:00
|
|
|
return new QPixmap(QPixmap::grabWindow(static_cast<WId>(param1), static_cast<int>(x), static_cast<int>(y)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWindow4(uintptr_t param1, int x, int y, int w) {
|
2024-09-18 00:12:02 +00:00
|
|
|
return new QPixmap(QPixmap::grabWindow(static_cast<WId>(param1), static_cast<int>(x), static_cast<int>(y), static_cast<int>(w)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWindow5(uintptr_t param1, int x, int y, int w, int h) {
|
2024-09-18 00:12:02 +00:00
|
|
|
return new QPixmap(QPixmap::grabWindow(static_cast<WId>(param1), static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWidget2(QObject* widget, int x) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::grabWidget(widget, static_cast<int>(x)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWidget3(QObject* widget, int x, int y) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::grabWidget(widget, static_cast<int>(x), static_cast<int>(y)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWidget4(QObject* widget, int x, int y, int w) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::grabWidget(widget, static_cast<int>(x), static_cast<int>(y), static_cast<int>(w)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_GrabWidget5(QObject* widget, int x, int y, int w, int h) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::grabWidget(widget, static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPixmap* QPixmap_Scaled3(const QPixmap* self, int w, int h, int aspectMode) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaled(static_cast<int>(w), static_cast<int>(h), static_cast<Qt::AspectRatioMode>(aspectMode)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPixmap* QPixmap_Scaled4(const QPixmap* self, int w, int h, int aspectMode, int mode) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaled(static_cast<int>(w), static_cast<int>(h), static_cast<Qt::AspectRatioMode>(aspectMode), static_cast<Qt::TransformationMode>(mode)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPixmap* QPixmap_Scaled2(const QPixmap* self, QSize* s, int aspectMode) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaled(*s, static_cast<Qt::AspectRatioMode>(aspectMode)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPixmap* QPixmap_Scaled32(const QPixmap* self, QSize* s, int aspectMode, int mode) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaled(*s, static_cast<Qt::AspectRatioMode>(aspectMode), static_cast<Qt::TransformationMode>(mode)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPixmap* QPixmap_ScaledToWidth2(const QPixmap* self, int w, int mode) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaledToWidth(static_cast<int>(w), static_cast<Qt::TransformationMode>(mode)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPixmap* QPixmap_ScaledToHeight2(const QPixmap* self, int h, int mode) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->scaledToHeight(static_cast<int>(h), static_cast<Qt::TransformationMode>(mode)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPixmap* QPixmap_Transformed2(const QPixmap* self, QMatrix* param1, int mode) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->transformed(*param1, static_cast<Qt::TransformationMode>(mode)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPixmap* QPixmap_Transformed22(const QPixmap* self, QTransform* param1, int mode) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->transformed(*param1, static_cast<Qt::TransformationMode>(mode)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_FromImage2(QImage* image, int flags) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::fromImage(*image, static_cast<Qt::ImageConversionFlags>(flags)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QPixmap_FromImageReader2(QImageReader* imageReader, int flags) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(QPixmap::fromImageReader(imageReader, static_cast<Qt::ImageConversionFlags>(flags)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPixmap_Load2(QPixmap* self, struct miqt_string fileName, const char* format) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-08-29 07:01:51 +00:00
|
|
|
return self->load(fileName_QString, format);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPixmap_Load3(QPixmap* self, struct miqt_string fileName, const char* format, int flags) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-08-29 07:01:51 +00:00
|
|
|
return self->load(fileName_QString, format, static_cast<Qt::ImageConversionFlags>(flags));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPixmap_LoadFromData3(QPixmap* self, const unsigned char* buf, unsigned int lenVal, const char* format) {
|
|
|
|
return self->loadFromData(static_cast<const uchar*>(buf), static_cast<uint>(lenVal), format);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPixmap_LoadFromData4(QPixmap* self, const unsigned char* buf, unsigned int lenVal, const char* format, int flags) {
|
|
|
|
return self->loadFromData(static_cast<const uchar*>(buf), static_cast<uint>(lenVal), format, static_cast<Qt::ImageConversionFlags>(flags));
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPixmap_LoadFromData2(QPixmap* self, struct miqt_string data, const char* format) {
|
|
|
|
QByteArray data_QByteArray(data.data, data.len);
|
|
|
|
return self->loadFromData(data_QByteArray, format);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPixmap_LoadFromData32(QPixmap* self, struct miqt_string data, const char* format, int flags) {
|
|
|
|
QByteArray data_QByteArray(data.data, data.len);
|
|
|
|
return self->loadFromData(data_QByteArray, format, static_cast<Qt::ImageConversionFlags>(flags));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPixmap_Save2(const QPixmap* self, struct miqt_string fileName, const char* format) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-09-11 05:41:09 +00:00
|
|
|
return self->save(fileName_QString, format);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPixmap_Save3(const QPixmap* self, struct miqt_string fileName, const char* format, int quality) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-09-11 05:41:09 +00:00
|
|
|
return self->save(fileName_QString, format, static_cast<int>(quality));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPixmap_Save22(const QPixmap* self, QIODevice* device, const char* format) {
|
|
|
|
return self->save(device, format);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPixmap_Save32(const QPixmap* self, QIODevice* device, const char* format, int quality) {
|
|
|
|
return self->save(device, format, static_cast<int>(quality));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
bool QPixmap_ConvertFromImage2(QPixmap* self, QImage* img, int flags) {
|
|
|
|
return self->convertFromImage(*img, static_cast<Qt::ImageConversionFlags>(flags));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QPixmap_Copy1(const QPixmap* self, QRect* rect) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->copy(*rect));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Scroll7(QPixmap* self, int dx, int dy, int x, int y, int width, int height, QRegion* exposed) {
|
|
|
|
self->scroll(static_cast<int>(dx), static_cast<int>(dy), static_cast<int>(x), static_cast<int>(y), static_cast<int>(width), static_cast<int>(height), exposed);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Scroll4(QPixmap* self, int dx, int dy, QRect* rect, QRegion* exposed) {
|
|
|
|
self->scroll(static_cast<int>(dx), static_cast<int>(dy), *rect, exposed);
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPixmap_override_virtual_DevType(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPixmap*>( (QPixmap*)(self) )->handle__DevType = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QPixmap_virtualbase_DevType(const void* self) {
|
|
|
|
return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_DevType();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_override_virtual_PaintEngine(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPixmap*>( (QPixmap*)(self) )->handle__PaintEngine = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintEngine* QPixmap_virtualbase_PaintEngine(const void* self) {
|
|
|
|
return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_PaintEngine();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_override_virtual_Metric(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPixmap*>( (QPixmap*)(self) )->handle__Metric = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QPixmap_virtualbase_Metric(const void* self, int param1) {
|
|
|
|
return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_Metric(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_override_virtual_InitPainter(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPixmap*>( (QPixmap*)(self) )->handle__InitPainter = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_virtualbase_InitPainter(const void* self, QPainter* painter) {
|
|
|
|
( (const MiqtVirtualQPixmap*)(self) )->virtualbase_InitPainter(painter);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_override_virtual_Redirected(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPixmap*>( (QPixmap*)(self) )->handle__Redirected = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintDevice* QPixmap_virtualbase_Redirected(const void* self, QPoint* offset) {
|
|
|
|
return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_Redirected(offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_override_virtual_SharedPainter(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPixmap*>( (QPixmap*)(self) )->handle__SharedPainter = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPainter* QPixmap_virtualbase_SharedPainter(const void* self) {
|
|
|
|
return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_SharedPainter();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPixmap_Delete(QPixmap* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<MiqtVirtualQPixmap*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|