2024-08-25 04:08:24 +00:00
|
|
|
#include <QChar>
|
|
|
|
#include <QFont>
|
|
|
|
#include <QFontMetrics>
|
|
|
|
#include <QFontMetricsF>
|
|
|
|
#include <QPaintDevice>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QRectF>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QSizeF>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include "qfontmetrics.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qfontmetrics.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
QFontMetrics* QFontMetrics_new(QFont* param1) {
|
|
|
|
return new QFontMetrics(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
QFontMetrics* QFontMetrics_new2(QFont* font, QPaintDevice* pd) {
|
|
|
|
return new QFontMetrics(*font, pd);
|
|
|
|
}
|
|
|
|
|
|
|
|
QFontMetrics* QFontMetrics_new3(QFontMetrics* param1) {
|
|
|
|
return new QFontMetrics(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFontMetrics_OperatorAssign(QFontMetrics* self, QFontMetrics* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFontMetrics_Swap(QFontMetrics* self, QFontMetrics* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_Ascent(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->ascent();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_CapHeight(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->capHeight();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_Descent(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->descent();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_Height(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->height();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_Leading(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->leading();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_LineSpacing(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->lineSpacing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_MinLeftBearing(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->minLeftBearing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_MinRightBearing(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->minRightBearing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_MaxWidth(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->maxWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_XHeight(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->xHeight();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_AverageCharWidth(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->averageCharWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QFontMetrics_InFont(QFontMetrics* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->inFont(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QFontMetrics_InFontUcs4(QFontMetrics* self, unsigned int ucs4) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->inFontUcs4(static_cast<uint>(ucs4));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_LeftBearing(QFontMetrics* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->leftBearing(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_RightBearing(QFontMetrics* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->rightBearing(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_Width(QFontMetrics* self, const char* param1, size_t param1_Strlen) {
|
|
|
|
QString param1_QString = QString::fromUtf8(param1, param1_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->width(param1_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_Width2(QFontMetrics* self, const char* param1, size_t param1_Strlen, int lenVal, int flags) {
|
|
|
|
QString param1_QString = QString::fromUtf8(param1, param1_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->width(param1_QString, static_cast<int>(lenVal), static_cast<int>(flags));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_WidthWithQChar(QFontMetrics* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->width(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_HorizontalAdvance(QFontMetrics* self, const char* param1, size_t param1_Strlen) {
|
|
|
|
QString param1_QString = QString::fromUtf8(param1, param1_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->horizontalAdvance(param1_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_HorizontalAdvanceWithQChar(QFontMetrics* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->horizontalAdvance(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_CharWidth(QFontMetrics* self, const char* str, size_t str_Strlen, int pos) {
|
|
|
|
QString str_QString = QString::fromUtf8(str, str_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->charWidth(str_QString, static_cast<int>(pos));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QFontMetrics_BoundingRect(QFontMetrics* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QRect ret = const_cast<const QFontMetrics*>(self)->boundingRect(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QFontMetrics_BoundingRectWithText(QFontMetrics* self, const char* text, size_t text_Strlen) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
QRect ret = const_cast<const QFontMetrics*>(self)->boundingRect(text_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QFontMetrics_BoundingRect2(QFontMetrics* self, QRect* r, int flags, const char* text, size_t text_Strlen) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
QRect ret = const_cast<const QFontMetrics*>(self)->boundingRect(*r, static_cast<int>(flags), text_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QFontMetrics_BoundingRect3(QFontMetrics* self, int x, int y, int w, int h, int flags, const char* text, size_t text_Strlen) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
QRect ret = const_cast<const QFontMetrics*>(self)->boundingRect(static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h), static_cast<int>(flags), text_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QFontMetrics_Size(QFontMetrics* self, int flags, const char* str, size_t str_Strlen) {
|
|
|
|
QString str_QString = QString::fromUtf8(str, str_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
QSize ret = const_cast<const QFontMetrics*>(self)->size(static_cast<int>(flags), str_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QFontMetrics_TightBoundingRect(QFontMetrics* self, const char* text, size_t text_Strlen) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
QRect ret = const_cast<const QFontMetrics*>(self)->tightBoundingRect(text_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QFontMetrics_ElidedText(QFontMetrics* self, const char* text, size_t text_Strlen, uintptr_t mode, int width, char** _out, int* _out_Strlen) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
|
|
|
QString ret = const_cast<const QFontMetrics*>(self)->elidedText(text_QString, static_cast<Qt::TextElideMode>(mode), static_cast<int>(width));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
int QFontMetrics_UnderlinePos(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->underlinePos();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_OverlinePos(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->overlinePos();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_StrikeOutPos(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->strikeOutPos();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_LineWidth(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->lineWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetrics_FontDpi(QFontMetrics* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->fontDpi();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QFontMetrics_OperatorEqual(QFontMetrics* self, QFontMetrics* other) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->operator==(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QFontMetrics_OperatorNotEqual(QFontMetrics* self, QFontMetrics* other) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetrics*>(self)->operator!=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_Width22(QFontMetrics* self, const char* param1, size_t param1_Strlen, int lenVal) {
|
|
|
|
QString param1_QString = QString::fromUtf8(param1, param1_Strlen);
|
|
|
|
return self->width(param1_QString, static_cast<int>(lenVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QFontMetrics_HorizontalAdvance2(QFontMetrics* self, const char* param1, size_t param1_Strlen, int lenVal) {
|
|
|
|
QString param1_QString = QString::fromUtf8(param1, param1_Strlen);
|
|
|
|
return self->horizontalAdvance(param1_QString, static_cast<int>(lenVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QFontMetrics_BoundingRect4(QFontMetrics* self, QRect* r, int flags, const char* text, size_t text_Strlen, int tabstops) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
|
|
|
QRect ret = self->boundingRect(*r, static_cast<int>(flags), text_QString, static_cast<int>(tabstops));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QFontMetrics_BoundingRect5(QFontMetrics* self, QRect* r, int flags, const char* text, size_t text_Strlen, int tabstops, int* tabarray) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
|
|
|
QRect ret = self->boundingRect(*r, static_cast<int>(flags), text_QString, static_cast<int>(tabstops), static_cast<int*>(tabarray));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QFontMetrics_BoundingRect7(QFontMetrics* self, int x, int y, int w, int h, int flags, const char* text, size_t text_Strlen, int tabstops) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
|
|
|
QRect ret = self->boundingRect(static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h), static_cast<int>(flags), text_QString, static_cast<int>(tabstops));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QFontMetrics_BoundingRect8(QFontMetrics* self, int x, int y, int w, int h, int flags, const char* text, size_t text_Strlen, int tabstops, int* tabarray) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
|
|
|
QRect ret = self->boundingRect(static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h), static_cast<int>(flags), text_QString, static_cast<int>(tabstops), static_cast<int*>(tabarray));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QFontMetrics_Size3(QFontMetrics* self, int flags, const char* str, size_t str_Strlen, int tabstops) {
|
|
|
|
QString str_QString = QString::fromUtf8(str, str_Strlen);
|
|
|
|
QSize ret = self->size(static_cast<int>(flags), str_QString, static_cast<int>(tabstops));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QFontMetrics_Size4(QFontMetrics* self, int flags, const char* str, size_t str_Strlen, int tabstops, int* tabarray) {
|
|
|
|
QString str_QString = QString::fromUtf8(str, str_Strlen);
|
|
|
|
QSize ret = self->size(static_cast<int>(flags), str_QString, static_cast<int>(tabstops), static_cast<int*>(tabarray));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QFontMetrics_ElidedText4(QFontMetrics* self, const char* text, size_t text_Strlen, uintptr_t mode, int width, int flags, char** _out, int* _out_Strlen) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
|
|
|
QString ret = self->elidedText(text_QString, static_cast<Qt::TextElideMode>(mode), static_cast<int>(width), static_cast<int>(flags));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QFontMetrics_Delete(QFontMetrics* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
|
|
|
QFontMetricsF* QFontMetricsF_new(QFont* font) {
|
|
|
|
return new QFontMetricsF(*font);
|
|
|
|
}
|
|
|
|
|
|
|
|
QFontMetricsF* QFontMetricsF_new2(QFont* font, QPaintDevice* pd) {
|
|
|
|
return new QFontMetricsF(*font, pd);
|
|
|
|
}
|
|
|
|
|
|
|
|
QFontMetricsF* QFontMetricsF_new3(QFontMetrics* param1) {
|
|
|
|
return new QFontMetricsF(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
QFontMetricsF* QFontMetricsF_new4(QFontMetricsF* param1) {
|
|
|
|
return new QFontMetricsF(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFontMetricsF_OperatorAssign(QFontMetricsF* self, QFontMetricsF* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFontMetricsF_OperatorAssignWithQFontMetrics(QFontMetricsF* self, QFontMetrics* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFontMetricsF_Swap(QFontMetricsF* self, QFontMetricsF* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_Ascent(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->ascent();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_CapHeight(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->capHeight();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_Descent(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->descent();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_Height(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->height();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_Leading(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->leading();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_LineSpacing(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->lineSpacing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_MinLeftBearing(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->minLeftBearing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_MinRightBearing(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->minRightBearing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_MaxWidth(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->maxWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_XHeight(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->xHeight();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_AverageCharWidth(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->averageCharWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QFontMetricsF_InFont(QFontMetricsF* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->inFont(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QFontMetricsF_InFontUcs4(QFontMetricsF* self, unsigned int ucs4) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->inFontUcs4(static_cast<uint>(ucs4));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_LeftBearing(QFontMetricsF* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->leftBearing(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_RightBearing(QFontMetricsF* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->rightBearing(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_Width(QFontMetricsF* self, const char* stringVal, size_t stringVal_Strlen) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal, stringVal_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->width(stringVal_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_WidthWithQChar(QFontMetricsF* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->width(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_HorizontalAdvance(QFontMetricsF* self, const char* stringVal, size_t stringVal_Strlen) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal, stringVal_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->horizontalAdvance(stringVal_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_HorizontalAdvanceWithQChar(QFontMetricsF* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->horizontalAdvance(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QRectF* QFontMetricsF_BoundingRect(QFontMetricsF* self, const char* stringVal, size_t stringVal_Strlen) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal, stringVal_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
QRectF ret = const_cast<const QFontMetricsF*>(self)->boundingRect(stringVal_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRectF*>(new QRectF(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRectF* QFontMetricsF_BoundingRectWithQChar(QFontMetricsF* self, QChar* param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QRectF ret = const_cast<const QFontMetricsF*>(self)->boundingRect(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRectF*>(new QRectF(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRectF* QFontMetricsF_BoundingRect2(QFontMetricsF* self, QRectF* r, int flags, const char* stringVal, size_t stringVal_Strlen) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal, stringVal_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
QRectF ret = const_cast<const QFontMetricsF*>(self)->boundingRect(*r, static_cast<int>(flags), stringVal_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRectF*>(new QRectF(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSizeF* QFontMetricsF_Size(QFontMetricsF* self, int flags, const char* str, size_t str_Strlen) {
|
|
|
|
QString str_QString = QString::fromUtf8(str, str_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
QSizeF ret = const_cast<const QFontMetricsF*>(self)->size(static_cast<int>(flags), str_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSizeF*>(new QSizeF(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRectF* QFontMetricsF_TightBoundingRect(QFontMetricsF* self, const char* text, size_t text_Strlen) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
QRectF ret = const_cast<const QFontMetricsF*>(self)->tightBoundingRect(text_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRectF*>(new QRectF(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QFontMetricsF_ElidedText(QFontMetricsF* self, const char* text, size_t text_Strlen, uintptr_t mode, double width, char** _out, int* _out_Strlen) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
|
|
|
QString ret = const_cast<const QFontMetricsF*>(self)->elidedText(text_QString, static_cast<Qt::TextElideMode>(mode), static_cast<qreal>(width));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
double QFontMetricsF_UnderlinePos(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->underlinePos();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_OverlinePos(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->overlinePos();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_StrikeOutPos(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->strikeOutPos();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_LineWidth(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->lineWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_FontDpi(QFontMetricsF* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->fontDpi();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QFontMetricsF_OperatorEqual(QFontMetricsF* self, QFontMetricsF* other) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->operator==(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QFontMetricsF_OperatorNotEqual(QFontMetricsF* self, QFontMetricsF* other) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QFontMetricsF*>(self)->operator!=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double QFontMetricsF_HorizontalAdvance2(QFontMetricsF* self, const char* stringVal, size_t stringVal_Strlen, int length) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal, stringVal_Strlen);
|
|
|
|
return self->horizontalAdvance(stringVal_QString, static_cast<int>(length));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRectF* QFontMetricsF_BoundingRect4(QFontMetricsF* self, QRectF* r, int flags, const char* stringVal, size_t stringVal_Strlen, int tabstops) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal, stringVal_Strlen);
|
|
|
|
QRectF ret = self->boundingRect(*r, static_cast<int>(flags), stringVal_QString, static_cast<int>(tabstops));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRectF*>(new QRectF(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRectF* QFontMetricsF_BoundingRect5(QFontMetricsF* self, QRectF* r, int flags, const char* stringVal, size_t stringVal_Strlen, int tabstops, int* tabarray) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal, stringVal_Strlen);
|
|
|
|
QRectF ret = self->boundingRect(*r, static_cast<int>(flags), stringVal_QString, static_cast<int>(tabstops), static_cast<int*>(tabarray));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRectF*>(new QRectF(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSizeF* QFontMetricsF_Size3(QFontMetricsF* self, int flags, const char* str, size_t str_Strlen, int tabstops) {
|
|
|
|
QString str_QString = QString::fromUtf8(str, str_Strlen);
|
|
|
|
QSizeF ret = self->size(static_cast<int>(flags), str_QString, static_cast<int>(tabstops));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSizeF*>(new QSizeF(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSizeF* QFontMetricsF_Size4(QFontMetricsF* self, int flags, const char* str, size_t str_Strlen, int tabstops, int* tabarray) {
|
|
|
|
QString str_QString = QString::fromUtf8(str, str_Strlen);
|
|
|
|
QSizeF ret = self->size(static_cast<int>(flags), str_QString, static_cast<int>(tabstops), static_cast<int*>(tabarray));
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSizeF*>(new QSizeF(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QFontMetricsF_ElidedText4(QFontMetricsF* self, const char* text, size_t text_Strlen, uintptr_t mode, double width, int flags, char** _out, int* _out_Strlen) {
|
|
|
|
QString text_QString = QString::fromUtf8(text, text_Strlen);
|
|
|
|
QString ret = self->elidedText(text_QString, static_cast<Qt::TextElideMode>(mode), static_cast<qreal>(width), static_cast<int>(flags));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QFontMetricsF_Delete(QFontMetricsF* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|