2024-08-25 04:08:24 +00:00
|
|
|
#include <QBrush>
|
|
|
|
#include <QFont>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QImage>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QLine>
|
|
|
|
#include <QLineF>
|
|
|
|
#include <QMatrix>
|
|
|
|
#include <QPaintDevice>
|
|
|
|
#include <QPaintEngine>
|
|
|
|
#include <QPaintEngineState>
|
|
|
|
#include <QPainter>
|
|
|
|
#include <QPainterPath>
|
|
|
|
#include <QPen>
|
|
|
|
#include <QPixmap>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QPointF>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QRectF>
|
|
|
|
#include <QRegion>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QTextItem>
|
|
|
|
#include <QTransform>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qpaintengine.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qpaintengine.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTextItem_Descent(const QTextItem* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->descent();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTextItem_Ascent(const QTextItem* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->ascent();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QTextItem_Width(const QTextItem* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->width();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTextItem_RenderFlags(const QTextItem* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTextItem::RenderFlags _ret = self->renderFlags();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTextItem_Text(const QTextItem* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->text();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QFont* QTextItem_Font(const QTextItem* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QFont(self->font());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextItem_Delete(QTextItem* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPaintEngine_IsActive(const QPaintEngine* self) {
|
|
|
|
return self->isActive();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_SetActive(QPaintEngine* self, bool newState) {
|
|
|
|
self->setActive(newState);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPaintEngine_Begin(QPaintEngine* self, QPaintDevice* pdev) {
|
|
|
|
return self->begin(pdev);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPaintEngine_End(QPaintEngine* self) {
|
|
|
|
return self->end();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_UpdateState(QPaintEngine* self, QPaintEngineState* state) {
|
|
|
|
self->updateState(*state);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawRects(QPaintEngine* self, QRect* rects, int rectCount) {
|
|
|
|
self->drawRects(rects, static_cast<int>(rectCount));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawRects2(QPaintEngine* self, QRectF* rects, int rectCount) {
|
|
|
|
self->drawRects(rects, static_cast<int>(rectCount));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawLines(QPaintEngine* self, QLine* lines, int lineCount) {
|
|
|
|
self->drawLines(lines, static_cast<int>(lineCount));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawLines2(QPaintEngine* self, QLineF* lines, int lineCount) {
|
|
|
|
self->drawLines(lines, static_cast<int>(lineCount));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawEllipse(QPaintEngine* self, QRectF* r) {
|
|
|
|
self->drawEllipse(*r);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawEllipseWithQRect(QPaintEngine* self, QRect* r) {
|
|
|
|
self->drawEllipse(*r);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawPath(QPaintEngine* self, QPainterPath* path) {
|
|
|
|
self->drawPath(*path);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawPoints(QPaintEngine* self, QPointF* points, int pointCount) {
|
|
|
|
self->drawPoints(points, static_cast<int>(pointCount));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawPoints2(QPaintEngine* self, QPoint* points, int pointCount) {
|
|
|
|
self->drawPoints(points, static_cast<int>(pointCount));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPaintEngine_DrawPolygon(QPaintEngine* self, QPointF* points, int pointCount, int mode) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->drawPolygon(points, static_cast<int>(pointCount), static_cast<QPaintEngine::PolygonDrawMode>(mode));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPaintEngine_DrawPolygon2(QPaintEngine* self, QPoint* points, int pointCount, int mode) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->drawPolygon(points, static_cast<int>(pointCount), static_cast<QPaintEngine::PolygonDrawMode>(mode));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QPaintEngine_DrawPixmap(QPaintEngine* self, QRectF* r, QPixmap* pm, QRectF* sr) {
|
|
|
|
self->drawPixmap(*r, *pm, *sr);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawTextItem(QPaintEngine* self, QPointF* p, QTextItem* textItem) {
|
|
|
|
self->drawTextItem(*p, *textItem);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawTiledPixmap(QPaintEngine* self, QRectF* r, QPixmap* pixmap, QPointF* s) {
|
|
|
|
self->drawTiledPixmap(*r, *pixmap, *s);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QPaintEngine_DrawImage(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr) {
|
|
|
|
self->drawImage(*r, *pm, *sr);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QPaintEngine_SetPaintDevice(QPaintEngine* self, QPaintDevice* device) {
|
|
|
|
self->setPaintDevice(device);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPaintDevice* QPaintEngine_PaintDevice(const QPaintEngine* self) {
|
|
|
|
return self->paintDevice();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_SetSystemClip(QPaintEngine* self, QRegion* baseClip) {
|
|
|
|
self->setSystemClip(*baseClip);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRegion* QPaintEngine_SystemClip(const QPaintEngine* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRegion(self->systemClip());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_SetSystemRect(QPaintEngine* self, QRect* rect) {
|
|
|
|
self->setSystemRect(*rect);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QPaintEngine_SystemRect(const QPaintEngine* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->systemRect());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QPaintEngine_CoordinateOffset(const QPaintEngine* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPoint(self->coordinateOffset());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPaintEngine_Type(const QPaintEngine* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPaintEngine::Type _ret = self->type();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QPaintEngine_FixNegRect(QPaintEngine* self, int* x, int* y, int* w, int* h) {
|
|
|
|
self->fix_neg_rect(static_cast<int*>(x), static_cast<int*>(y), static_cast<int*>(w), static_cast<int*>(h));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
bool QPaintEngine_TestDirty(QPaintEngine* self, int df) {
|
|
|
|
return self->testDirty(static_cast<QPaintEngine::DirtyFlags>(df));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_SetDirty(QPaintEngine* self, int df) {
|
|
|
|
self->setDirty(static_cast<QPaintEngine::DirtyFlags>(df));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_ClearDirty(QPaintEngine* self, int df) {
|
|
|
|
self->clearDirty(static_cast<QPaintEngine::DirtyFlags>(df));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPaintEngine_HasFeature(const QPaintEngine* self, int feature) {
|
|
|
|
return self->hasFeature(static_cast<QPaintEngine::PaintEngineFeatures>(feature));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPainter* QPaintEngine_Painter(const QPaintEngine* self) {
|
|
|
|
return self->painter();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_SyncState(QPaintEngine* self) {
|
|
|
|
self->syncState();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPaintEngine_IsExtended(const QPaintEngine* self) {
|
|
|
|
return self->isExtended();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_DrawImage4(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr, int flags) {
|
|
|
|
self->drawImage(*r, *pm, *sr, static_cast<Qt::ImageConversionFlags>(flags));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngine_Delete(QPaintEngine* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPaintEngineState_State(const QPaintEngineState* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPaintEngine::DirtyFlags _ret = self->state();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPen* QPaintEngineState_Pen(const QPaintEngineState* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPen(self->pen());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPaintEngineState_Brush(const QPaintEngineState* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBrush(self->brush());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPointF* QPaintEngineState_BrushOrigin(const QPaintEngineState* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPointF(self->brushOrigin());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPaintEngineState_BackgroundBrush(const QPaintEngineState* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBrush(self->backgroundBrush());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPaintEngineState_BackgroundMode(const QPaintEngineState* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::BGMode _ret = self->backgroundMode();
|
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
|
|
|
QFont* QPaintEngineState_Font(const QPaintEngineState* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QFont(self->font());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMatrix* QPaintEngineState_Matrix(const QPaintEngineState* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMatrix(self->matrix());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTransform* QPaintEngineState_Transform(const QPaintEngineState* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QTransform(self->transform());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPaintEngineState_ClipOperation(const QPaintEngineState* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ClipOperation _ret = self->clipOperation();
|
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
|
|
|
QRegion* QPaintEngineState_ClipRegion(const QPaintEngineState* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRegion(self->clipRegion());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPainterPath* QPaintEngineState_ClipPath(const QPaintEngineState* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPainterPath(self->clipPath());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPaintEngineState_IsClipEnabled(const QPaintEngineState* self) {
|
|
|
|
return self->isClipEnabled();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPaintEngineState_RenderHints(const QPaintEngineState* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPainter::RenderHints _ret = self->renderHints();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPaintEngineState_CompositionMode(const QPaintEngineState* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPainter::CompositionMode _ret = self->compositionMode();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QPaintEngineState_Opacity(const QPaintEngineState* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->opacity();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPainter* QPaintEngineState_Painter(const QPaintEngineState* self) {
|
|
|
|
return self->painter();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPaintEngineState_BrushNeedsResolving(const QPaintEngineState* self) {
|
|
|
|
return self->brushNeedsResolving();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPaintEngineState_PenNeedsResolving(const QPaintEngineState* self) {
|
|
|
|
return self->penNeedsResolving();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPaintEngineState_Delete(QPaintEngineState* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|