#include "../rute_base.h"
#include "../rute_manual.h"
#include <QMatrix>
#include "matrix_ffi.h"
static float matrix_m11(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->m11();
return ret_value;
}
static float matrix_m12(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->m12();
return ret_value;
}
static float matrix_m21(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->m21();
return ret_value;
}
static float matrix_m22(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->m22();
return ret_value;
}
static float matrix_dx(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->dx();
return ret_value;
}
static float matrix_dy(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->dy();
return ret_value;
}
static struct RURect matrix_map_rect(struct RUBase* self_c, struct RUBase* arg0) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->mapRect(*((QRect*)arg0));
WRRect* new_val = new WRRect();
*new_val = ret_value;
struct RURect ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_rect_all_funcs;
return ctl;
}
static struct RURectF matrix_map_rect_2(struct RUBase* self_c, struct RUBase* arg0) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->mapRect(*((QRectF*)arg0));
WRRectF* new_val = new WRRectF();
*new_val = ret_value;
struct RURectF ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_rect_f_all_funcs;
return ctl;
}
static struct RUPoint matrix_map_3(struct RUBase* self_c, struct RUBase* p) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->map(*((QPoint*)p));
WRPoint* new_val = new WRPoint();
*new_val = ret_value;
struct RUPoint ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_point_all_funcs;
return ctl;
}
static struct RUPointF matrix_map_4(struct RUBase* self_c, struct RUBase* p) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->map(*((QPointF*)p));
WRPointF* new_val = new WRPointF();
*new_val = ret_value;
struct RUPointF ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_point_f_all_funcs;
return ctl;
}
static struct RULine matrix_map_5(struct RUBase* self_c, struct RUBase* l) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->map(*((QLine*)l));
WRLine* new_val = new WRLine();
*new_val = ret_value;
struct RULine ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_line_all_funcs;
return ctl;
}
static struct RULineF matrix_map_6(struct RUBase* self_c, struct RUBase* l) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->map(*((QLineF*)l));
WRLineF* new_val = new WRLineF();
*new_val = ret_value;
struct RULineF ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_line_f_all_funcs;
return ctl;
}
static struct RUPolygonF matrix_map_7(struct RUBase* self_c, struct RUBase* a) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->map(*((QPolygonF*)a));
WRPolygonF* new_val = new WRPolygonF();
*new_val = ret_value;
struct RUPolygonF ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_polygon_f_all_funcs;
return ctl;
}
static struct RUPolygon matrix_map_8(struct RUBase* self_c, struct RUBase* a) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->map(*((QPolygon*)a));
WRPolygon* new_val = new WRPolygon();
*new_val = ret_value;
struct RUPolygon ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_polygon_all_funcs;
return ctl;
}
static struct RURegion matrix_map_9(struct RUBase* self_c, struct RUBase* r) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->map(*((QRegion*)r));
WRRegion* new_val = new WRRegion();
*new_val = ret_value;
struct RURegion ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_region_all_funcs;
return ctl;
}
static struct RUPolygon matrix_map_to_polygon(struct RUBase* self_c, struct RUBase* r) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->mapToPolygon(*((QRect*)r));
WRPolygon* new_val = new WRPolygon();
*new_val = ret_value;
struct RUPolygon ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_polygon_all_funcs;
return ctl;
}
static void matrix_reset(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
qt_value->reset();
}
static bool matrix_is_identity(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->isIdentity();
return ret_value;
}
static struct RUMatrix matrix_scale(struct RUBase* self_c, float sx, float sy) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->scale(sx, sy);
WRMatrix* new_val = new WRMatrix();
*new_val = ret_value;
struct RUMatrix ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_matrix_all_funcs;
return ctl;
}
static struct RUMatrix matrix_shear(struct RUBase* self_c, float sh, float sv) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->shear(sh, sv);
WRMatrix* new_val = new WRMatrix();
*new_val = ret_value;
struct RUMatrix ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_matrix_all_funcs;
return ctl;
}
static struct RUMatrix matrix_rotate(struct RUBase* self_c, float a) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->rotate(a);
WRMatrix* new_val = new WRMatrix();
*new_val = ret_value;
struct RUMatrix ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_matrix_all_funcs;
return ctl;
}
static bool matrix_is_invertible(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->isInvertible();
return ret_value;
}
static float matrix_determinant(struct RUBase* self_c) {
WRMatrix* qt_value = (WRMatrix*)self_c;
auto ret_value = qt_value->determinant();
return ret_value;
}
static struct RUMatrix create_matrix(
struct RUBase* priv_data,
RUDeleteCallback delete_callback,
void* private_user_data)
{
auto ctl = generic_create_func_with_delete<struct RUMatrix, WRMatrix>(priv_data, delete_callback, private_user_data);
ctl.all_funcs = &s_matrix_all_funcs;
return ctl;
}
static void destroy_matrix(struct RUBase* priv_data) {
destroy_generic<WRMatrix>(priv_data);
}
struct RUMatrixFuncs s_matrix_funcs = {
destroy_matrix,
matrix_m11,
matrix_m12,
matrix_m21,
matrix_m22,
matrix_dx,
matrix_dy,
matrix_map_rect,
matrix_map_rect_2,
matrix_map_3,
matrix_map_4,
matrix_map_5,
matrix_map_6,
matrix_map_7,
matrix_map_8,
matrix_map_9,
matrix_map_to_polygon,
matrix_reset,
matrix_is_identity,
matrix_scale,
matrix_shear,
matrix_rotate,
matrix_is_invertible,
matrix_determinant,
};
struct RUMatrixAllFuncs s_matrix_all_funcs = {
&s_matrix_funcs,
};