2024-08-25 04:08:24 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <QColorSpace>
|
|
|
|
#include <QColorTransform>
|
|
|
|
#include <QPointF>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qcolorspace.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qcolorspace.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
QColorSpace* QColorSpace_new() {
|
|
|
|
return new QColorSpace();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QColorSpace* QColorSpace_new2(uintptr_t namedColorSpace) {
|
|
|
|
return new QColorSpace(static_cast<QColorSpace::NamedColorSpace>(namedColorSpace));
|
|
|
|
}
|
|
|
|
|
|
|
|
QColorSpace* QColorSpace_new3(uintptr_t primaries, uintptr_t transferFunction) {
|
|
|
|
return new QColorSpace(static_cast<QColorSpace::Primaries>(primaries), static_cast<QColorSpace::TransferFunction>(transferFunction));
|
|
|
|
}
|
|
|
|
|
|
|
|
QColorSpace* QColorSpace_new4(uintptr_t primaries, float gamma) {
|
|
|
|
return new QColorSpace(static_cast<QColorSpace::Primaries>(primaries), static_cast<float>(gamma));
|
|
|
|
}
|
|
|
|
|
|
|
|
QColorSpace* QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, uintptr_t transferFunction) {
|
|
|
|
return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast<QColorSpace::TransferFunction>(transferFunction));
|
|
|
|
}
|
|
|
|
|
|
|
|
QColorSpace* QColorSpace_new6(QColorSpace* colorSpace) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QColorSpace(*colorSpace);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QColorSpace* QColorSpace_new7(uintptr_t primaries, uintptr_t transferFunction, float gamma) {
|
|
|
|
return new QColorSpace(static_cast<QColorSpace::Primaries>(primaries), static_cast<QColorSpace::TransferFunction>(transferFunction), static_cast<float>(gamma));
|
|
|
|
}
|
|
|
|
|
|
|
|
QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, uintptr_t transferFunction, float gamma) {
|
|
|
|
return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast<QColorSpace::TransferFunction>(transferFunction), static_cast<float>(gamma));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QColorSpace_OperatorAssign(QColorSpace* self, QColorSpace* colorSpace) {
|
|
|
|
self->operator=(*colorSpace);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QColorSpace_Swap(QColorSpace* self, QColorSpace* colorSpace) {
|
|
|
|
self->swap(*colorSpace);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
uintptr_t QColorSpace_Primaries(QColorSpace* self) {
|
|
|
|
QColorSpace::Primaries ret = const_cast<const QColorSpace*>(self)->primaries();
|
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
uintptr_t QColorSpace_TransferFunction(QColorSpace* self) {
|
|
|
|
QColorSpace::TransferFunction ret = const_cast<const QColorSpace*>(self)->transferFunction();
|
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
float QColorSpace_Gamma(QColorSpace* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QColorSpace*>(self)->gamma();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QColorSpace_SetTransferFunction(QColorSpace* self, uintptr_t transferFunction) {
|
|
|
|
self->setTransferFunction(static_cast<QColorSpace::TransferFunction>(transferFunction));
|
|
|
|
}
|
|
|
|
|
|
|
|
QColorSpace* QColorSpace_WithTransferFunction(QColorSpace* self, uintptr_t transferFunction) {
|
|
|
|
QColorSpace ret = const_cast<const QColorSpace*>(self)->withTransferFunction(static_cast<QColorSpace::TransferFunction>(transferFunction));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QColorSpace*>(new QColorSpace(ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QColorSpace_SetPrimaries(QColorSpace* self, uintptr_t primariesId) {
|
|
|
|
self->setPrimaries(static_cast<QColorSpace::Primaries>(primariesId));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QColorSpace_SetPrimaries2(QColorSpace* self, QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setPrimaries(*whitePoint, *redPoint, *greenPoint, *bluePoint);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QColorSpace_IsValid(QColorSpace* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QColorSpace*>(self)->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QColorSpace* QColorSpace_FromIccProfile(QByteArray* iccProfile) {
|
|
|
|
QColorSpace ret = QColorSpace::fromIccProfile(*iccProfile);
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QColorSpace*>(new QColorSpace(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QByteArray* QColorSpace_IccProfile(QColorSpace* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QByteArray ret = const_cast<const QColorSpace*>(self)->iccProfile();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QByteArray*>(new QByteArray(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QColorTransform* QColorSpace_TransformationToColorSpace(QColorSpace* self, QColorSpace* colorspace) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QColorTransform ret = const_cast<const QColorSpace*>(self)->transformationToColorSpace(*colorspace);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QColorTransform*>(new QColorTransform(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QColorSpace_SetTransferFunction2(QColorSpace* self, uintptr_t transferFunction, float gamma) {
|
|
|
|
self->setTransferFunction(static_cast<QColorSpace::TransferFunction>(transferFunction), static_cast<float>(gamma));
|
|
|
|
}
|
|
|
|
|
|
|
|
QColorSpace* QColorSpace_WithTransferFunction2(QColorSpace* self, uintptr_t transferFunction, float gamma) {
|
|
|
|
QColorSpace ret = self->withTransferFunction(static_cast<QColorSpace::TransferFunction>(transferFunction), static_cast<float>(gamma));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QColorSpace*>(new QColorSpace(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QColorSpace_Delete(QColorSpace* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|