2024-08-25 04:08:24 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <QColorSpace>
|
|
|
|
#include <QColorTransform>
|
|
|
|
#include <QPointF>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qcolorspace.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qcolorspace.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QColorSpace* QColorSpace_new() {
|
|
|
|
return new QColorSpace();
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QColorSpace* QColorSpace_new2(int namedColorSpace) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QColorSpace(static_cast<QColorSpace::NamedColorSpace>(namedColorSpace));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QColorSpace* QColorSpace_new3(int primaries, int transferFunction) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QColorSpace(static_cast<QColorSpace::Primaries>(primaries), static_cast<QColorSpace::TransferFunction>(transferFunction));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QColorSpace* QColorSpace_new4(int primaries, float gamma) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QColorSpace(static_cast<QColorSpace::Primaries>(primaries), static_cast<float>(gamma));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QColorSpace* QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction) {
|
2024-08-29 07:01:51 +00:00
|
|
|
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-09-18 00:12:02 +00:00
|
|
|
QColorSpace* QColorSpace_new7(int primaries, int transferFunction, float gamma) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QColorSpace(static_cast<QColorSpace::Primaries>(primaries), static_cast<QColorSpace::TransferFunction>(transferFunction), static_cast<float>(gamma));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma) {
|
2024-08-29 07:01:51 +00:00
|
|
|
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-09-18 00:12:02 +00:00
|
|
|
int QColorSpace_Primaries(const QColorSpace* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QColorSpace::Primaries _ret = self->primaries();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QColorSpace_TransferFunction(const QColorSpace* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QColorSpace::TransferFunction _ret = self->transferFunction();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
float QColorSpace_Gamma(const QColorSpace* self) {
|
|
|
|
return self->gamma();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QColorSpace_SetTransferFunction(QColorSpace* self, int transferFunction) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setTransferFunction(static_cast<QColorSpace::TransferFunction>(transferFunction));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QColorSpace* QColorSpace_WithTransferFunction(const QColorSpace* self, int transferFunction) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QColorSpace(self->withTransferFunction(static_cast<QColorSpace::TransferFunction>(transferFunction)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QColorSpace_SetPrimaries(QColorSpace* self, int primariesId) {
|
2024-08-29 07:01:51 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QColorSpace_IsValid(const QColorSpace* self) {
|
|
|
|
return self->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
QColorSpace* QColorSpace_FromIccProfile(struct miqt_string iccProfile) {
|
|
|
|
QByteArray iccProfile_QByteArray(iccProfile.data, iccProfile.len);
|
|
|
|
return new QColorSpace(QColorSpace::fromIccProfile(iccProfile_QByteArray));
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QColorSpace_IccProfile(const QColorSpace* self) {
|
|
|
|
QByteArray _qb = self->iccProfile();
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _qb.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _qb.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QColorTransform* QColorSpace_TransformationToColorSpace(const QColorSpace* self, QColorSpace* colorspace) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QColorTransform(self->transformationToColorSpace(*colorspace));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QColorSpace_SetTransferFunction2(QColorSpace* self, int transferFunction, float gamma) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setTransferFunction(static_cast<QColorSpace::TransferFunction>(transferFunction), static_cast<float>(gamma));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QColorSpace* QColorSpace_WithTransferFunction2(const QColorSpace* self, int transferFunction, float gamma) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QColorSpace(self->withTransferFunction(static_cast<QColorSpace::TransferFunction>(transferFunction), static_cast<float>(gamma)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QColorSpace_Delete(QColorSpace* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|