📄 g2_wrap.c
字号:
XS(_wrap_g2_plot_QP) { int arg1 ; double arg2 ; double arg3 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { croak("Usage: g2_plot_QP(dev,x,y);"); } arg1 = (int) SvIV(ST(0)); arg2 = (double) SvNV(ST(1)); arg3 = (double) SvNV(ST(2)); g2_plot_QP(arg1,arg2,arg3); XSRETURN(argvi);}XS(_wrap_g2_query_pointer) { int arg1 ; double *arg2 ; double *arg3 ; unsigned int *arg4 ; double temp2 ; double temp3 ; unsigned int temp4 ; int argvi = 0; dXSARGS; { arg2 = &temp2; } { arg3 = &temp3; } { arg4 = &temp4; } if ((items < 1) || (items > 1)) { croak("Usage: g2_query_pointer(dev);"); } arg1 = (int) SvIV(ST(0)); g2_query_pointer(arg1,arg2,arg3,arg4); { if (argvi >= items) { EXTEND(sp,1); } ST(argvi) = sv_newmortal(); sv_setnv(ST(argvi),(double) *(arg2)); argvi++; } { if (argvi >= items) { EXTEND(sp,1); } ST(argvi) = sv_newmortal(); sv_setnv(ST(argvi),(double) *(arg3)); argvi++; } { if (argvi >= items) { EXTEND(sp,1); } ST(argvi) = sv_newmortal(); sv_setiv(ST(argvi),(IV) *(arg4)); argvi++; } XSRETURN(argvi);}XS(_wrap_g2_spline) { int arg1 ; int arg2 ; double *arg3 ; int arg4 ; int argvi = 0; dXSARGS; if ((items < 4) || (items > 4)) { croak("Usage: g2_spline(id,n,points,o);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_spline. Expected %s", SWIGTYPE_p_double->name); } } arg4 = (int) SvIV(ST(3)); g2_spline(arg1,arg2,arg3,arg4); XSRETURN(argvi);}XS(_wrap_g2_b_spline) { int arg1 ; int arg2 ; double *arg3 ; int arg4 ; int argvi = 0; dXSARGS; if ((items < 4) || (items > 4)) { croak("Usage: g2_b_spline(id,n,points,o);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_b_spline. Expected %s", SWIGTYPE_p_double->name); } } arg4 = (int) SvIV(ST(3)); g2_b_spline(arg1,arg2,arg3,arg4); XSRETURN(argvi);}XS(_wrap_g2_raspln) { int arg1 ; int arg2 ; double *arg3 ; double arg4 ; int argvi = 0; dXSARGS; if ((items < 4) || (items > 4)) { croak("Usage: g2_raspln(id,n,points,tn);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_raspln. Expected %s", SWIGTYPE_p_double->name); } } arg4 = (double) SvNV(ST(3)); g2_raspln(arg1,arg2,arg3,arg4); XSRETURN(argvi);}XS(_wrap_g2_para_3) { int arg1 ; int arg2 ; double *arg3 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { croak("Usage: g2_para_3(id,n,points);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_para_3. Expected %s", SWIGTYPE_p_double->name); } } g2_para_3(arg1,arg2,arg3); XSRETURN(argvi);}XS(_wrap_g2_para_5) { int arg1 ; int arg2 ; double *arg3 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { croak("Usage: g2_para_5(id,n,points);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_para_5. Expected %s", SWIGTYPE_p_double->name); } } g2_para_5(arg1,arg2,arg3); XSRETURN(argvi);}XS(_wrap_g2_filled_spline) { int arg1 ; int arg2 ; double *arg3 ; int arg4 ; int argvi = 0; dXSARGS; if ((items < 4) || (items > 4)) { croak("Usage: g2_filled_spline(id,n,points,o);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_filled_spline. Expected %s", SWIGTYPE_p_double->name); } } arg4 = (int) SvIV(ST(3)); g2_filled_spline(arg1,arg2,arg3,arg4); XSRETURN(argvi);}XS(_wrap_g2_filled_b_spline) { int arg1 ; int arg2 ; double *arg3 ; int arg4 ; int argvi = 0; dXSARGS; if ((items < 4) || (items > 4)) { croak("Usage: g2_filled_b_spline(id,n,points,o);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_filled_b_spline. Expected %s", SWIGTYPE_p_double->name); } } arg4 = (int) SvIV(ST(3)); g2_filled_b_spline(arg1,arg2,arg3,arg4); XSRETURN(argvi);}XS(_wrap_g2_filled_raspln) { int arg1 ; int arg2 ; double *arg3 ; double arg4 ; int argvi = 0; dXSARGS; if ((items < 4) || (items > 4)) { croak("Usage: g2_filled_raspln(id,n,points,tn);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_filled_raspln. Expected %s", SWIGTYPE_p_double->name); } } arg4 = (double) SvNV(ST(3)); g2_filled_raspln(arg1,arg2,arg3,arg4); XSRETURN(argvi);}XS(_wrap_g2_filled_para_3) { int arg1 ; int arg2 ; double *arg3 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { croak("Usage: g2_filled_para_3(id,n,points);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_filled_para_3. Expected %s", SWIGTYPE_p_double->name); } } g2_filled_para_3(arg1,arg2,arg3); XSRETURN(argvi);}XS(_wrap_g2_filled_para_5) { int arg1 ; int arg2 ; double *arg3 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { croak("Usage: g2_filled_para_5(id,n,points);"); } arg1 = (int) SvIV(ST(0)); arg2 = (int) SvIV(ST(1)); { if (SWIG_ConvertPtr(ST(2), (void **) &arg3, SWIGTYPE_p_double,0) < 0) { croak("Type error in argument 3 of g2_filled_para_5. Expected %s", SWIGTYPE_p_double->name); } } g2_filled_para_5(arg1,arg2,arg3); XSRETURN(argvi);}XS(_wrap_g2_device_exist) { int arg1 ; int result; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { croak("Usage: g2_device_exist(dix);"); } arg1 = (int) SvIV(ST(0)); result = (int)g2_device_exist(arg1); ST(argvi) = sv_newmortal(); sv_setiv(ST(argvi++), (IV) result); XSRETURN(argvi);}/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */static swig_type_info _swigt__p_double[] = {{"_p_double", 0, "double *"},{"_p_double"},{0}};static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *"},{"_p_int"},{0}};static swig_type_info *swig_types_initial[] = {_swigt__p_double, _swigt__p_int, 0};/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */static swig_constant_info swig_constants[] = {{ SWIG_STRING, (char *) SWIG_prefix "G2_VERSION", 0, 0, (void *)"0.41a", 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A0", (long) g2_A0, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A1", (long) g2_A1, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A2", (long) g2_A2, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A3", (long) g2_A3, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A4", (long) g2_A4, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A5", (long) g2_A5, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A6", (long) g2_A6, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A7", (long) g2_A7, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A8", (long) g2_A8, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_A9", (long) g2_A9, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B0", (long) g2_B0, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B1", (long) g2_B1, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B2", (long) g2_B2, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B3", (long) g2_B3, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B4", (long) g2_B4, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B5", (long) g2_B5, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B6", (long) g2_B6, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B7", (long) g2_B7, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B8", (long) g2_B8, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B9", (long) g2_B9, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_B10", (long) g2_B10, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_Comm_10_Envelope", (long) g2_Comm_10_Envelope, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_C5_Envelope", (long) g2_C5_Envelope, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_DL_Envelope", (long) g2_DL_Envelope, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_Folio", (long) g2_Folio, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_Executive", (long) g2_Executive, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_Letter", (long) g2_Letter, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_Legal", (long) g2_Legal, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_Ledger", (long) g2_Ledger, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_Tabloid", (long) g2_Tabloid, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_PS_land", (long) g2_PS_land, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_PS_port", (long) g2_PS_port, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_PS_PostScript", (long) g2_PS_PostScript, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_PS_EPSF", (long) g2_PS_EPSF, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_PS_EPSF_CLIP", (long) g2_PS_EPSF_CLIP, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_gd_jpeg", (long) g2_gd_jpeg, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_gd_png", (long) g2_gd_png, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_win32", (long) g2_win32, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "g2_wmf32", (long) g2_wmf32, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "QPrect", (long) QPrect, 0, 0, 0},{ SWIG_INT, (char *) SWIG_prefix "QPcirc", (long) QPcirc, 0, 0, 0},{0}};#ifdef __cplusplus}#endifstatic swig_variable_info swig_variables[] = {{0}};static swig_command_info swig_commands[] = {{"g2::g2_open_PS", _wrap_g2_open_PS},{"g2::g2_open_EPSF", _wrap_g2_open_EPSF},{"g2::g2_open_EPSF_CLIP", _wrap_g2_open_EPSF_CLIP},{"g2::g2_open_gd", _wrap_g2_open_gd},{"g2::g2_open_win32", _wrap_g2_open_win32},{"g2::g2_open_vd", _wrap_g2_open_vd},{"g2::g2_attach", _wrap_g2_attach},{"g2::g2_detach", _wrap_g2_detach},{"g2::g2_close", _wrap_g2_close},{"g2::g2_set_auto_flush", _wrap_g2_set_auto_flush},{"g2::g2_flush", _wrap_g2_flush},{"g2::g2_save", _wrap_g2_save},{"g2::g2_set_coordinate_system", _wrap_g2_set_coordinate_system},{"g2::g2_ld", _wrap_g2_ld},{"g2::g2_set_ld", _wrap_g2_set_ld},{"g2::g2_ink", _wrap_g2_ink},{"g2::g2_pen", _wrap_g2_pen},{"g2::g2_set_dash", _wrap_g2_set_dash},{"g2::g2_set_font_size", _wrap_g2_set_font_size},{"g2::g2_set_line_width", _wrap_g2_set_line_width},{"g2::g2_clear_palette", _wrap_g2_clear_palette},{"g2::g2_reset_palette", _wrap_g2_reset_palette},{"g2::g2_allocate_basic_colors", _wrap_g2_allocate_basic_colors},{"g2::g2_clear", _wrap_g2_clear},{"g2::g2_set_background", _wrap_g2_set_background},{"g2::g2_move", _wrap_g2_move},{"g2::g2_move_r", _wrap_g2_move_r},{"g2::g2_plot", _wrap_g2_plot},{"g2::g2_plot_r", _wrap_g2_plot_r},{"g2::g2_line", _wrap_g2_line},{"g2::g2_line_r", _wrap_g2_line_r},{"g2::g2_line_to", _wrap_g2_line_to},{"g2::g2_poly_line", _wrap_g2_poly_line},{"g2::g2_triangle", _wrap_g2_triangle},{"g2::g2_filled_triangle", _wrap_g2_filled_triangle},{"g2::g2_rectangle", _wrap_g2_rectangle},{"g2::g2_filled_rectangle", _wrap_g2_filled_rectangle},{"g2::g2_polygon", _wrap_g2_polygon},{"g2::g2_filled_polygon", _wrap_g2_filled_polygon},{"g2::g2_circle", _wrap_g2_circle},{"g2::g2_filled_circle", _wrap_g2_filled_circle},{"g2::g2_ellipse", _wrap_g2_ellipse},{"g2::g2_filled_ellipse", _wrap_g2_filled_ellipse},{"g2::g2_arc", _wrap_g2_arc},{"g2::g2_filled_arc", _wrap_g2_filled_arc},{"g2::g2_string", _wrap_g2_string},{"g2::g2_image", _wrap_g2_image},{"g2::g2_set_QP", _wrap_g2_set_QP},{"g2::g2_plot_QP", _wrap_g2_plot_QP},{"g2::g2_query_pointer", _wrap_g2_query_pointer},{"g2::g2_spline", _wrap_g2_spline},{"g2::g2_b_spline", _wrap_g2_b_spline},{"g2::g2_raspln", _wrap_g2_raspln},{"g2::g2_para_3", _wrap_g2_para_3},{"g2::g2_para_5", _wrap_g2_para_5},{"g2::g2_filled_spline", _wrap_g2_filled_spline},{"g2::g2_filled_b_spline", _wrap_g2_filled_b_spline},{"g2::g2_filled_raspln", _wrap_g2_filled_raspln},{"g2::g2_filled_para_3", _wrap_g2_filled_para_3},{"g2::g2_filled_para_5", _wrap_g2_filled_para_5},{"g2::g2_device_exist", _wrap_g2_device_exist},{0,0}};#ifdef __cplusplusextern "C"#endifXS(SWIG_init) { dXSARGS; int i; for (i = 0; swig_types_initial[i]; i++) { swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]); } /* Install commands */ for (i = 0; swig_commands[i].name; i++) { newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__); } /* Install variables */ for (i = 0; swig_variables[i].name; i++) { SV *sv; sv = perl_get_sv((char*) swig_variables[i].name, TRUE | 0x2); if (swig_variables[i].type) { SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0); }else { sv_setiv(sv,(IV) 0); } swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); } /* Install constant */ for (i = 0; swig_constants[i].type; i++) { SV *sv; sv = perl_get_sv((char*)swig_constants[i].name, TRUE | 0x2); switch(swig_constants[i].type) { case SWIG_INT: sv_setiv(sv, (IV) swig_constants[i].lvalue); break; case SWIG_FLOAT: sv_setnv(sv, (double) swig_constants[i].dvalue); break; case SWIG_STRING: sv_setpv(sv, (char *) swig_constants[i].pvalue); break; case SWIG_POINTER: SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0); break; case SWIG_BINARY: /* obj = SWIG_NewPackedObj(swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype)); */ break; default: break; } SvREADONLY_on(sv); } ST(0) = &PL_sv_yes; XSRETURN(1);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -