int output_swf_writer(FILE* file, at_string name, int llx, int lly, int urx, int ury, at_output_opts_type * opts, spline_list_array_type shape, at_msg_func msg_func, at_address msg_data, at_address user_data) { int width = urx - llx; int height = ury - lly; SWFMovie m; #ifdef _WINDOWS if(file == stdout) { fprintf(stderr, "This driver couldn't write to stdout!\n"); return -1; } #endif Ming_init(); Ming_setCubicThreshold(20000); m = newSWFMovie(); out_splines(m, shape, height); SWFMovie_setDimension(m, SWFSCALE*(float)width, SWFSCALE*(float)height); SWFMovie_setRate(m, FPS); SWFMovie_nextFrame(m); SWFMovie_output(m, fileOutputMethod, file); return 0; }
int output_svg_writer(FILE * const fileP, const char * const name, int const llx, int const lly, int const urx, int const ury, at_output_opts_type * const opts, at_spline_list_array_type const shape, at_msg_func msg_func, void * const msg_data) { int const width = urx - llx; int const height = ury - lly; fputs("<?xml version=\"1.0\" standalone=\"yes\"?>\n", fileP); fprintf(fileP, "<svg width=\"%d\" height=\"%d\">\n", width, height); out_splines(fileP, shape, height); fputs("</svg>\n", fileP); return 0; }
int output_svg_writer(FILE * file, gchar * name, int llx, int lly, int urx, int ury, at_output_opts_type * opts, spline_list_array_type shape, at_msg_func msg_func, gpointer msg_data, gpointer user_data) { int width = urx - llx; int height = ury - lly; fputs("<?xml version=\"1.0\" standalone=\"yes\"?>\n", file); fprintf(file, "<svg width=\"%d\" height=\"%d\">\n", width, height); out_splines(file, shape, height); fputs("</svg>\n", file); return 0; }
/****************************************************************************** * DXF output function. */ int output_dxf12_writer(FILE* dxf_file, gchar* name, int llx, int lly, int urx, int ury, at_output_opts_type * opts, spline_list_array_type shape, at_msg_func msg_func, gpointer msg_data, gpointer user_data) { OUT_LINE (" 0"); OUT_LINE ("SECTION"); OUT_LINE (" 2"); OUT_LINE ("HEADER"); OUT_LINE (" 9"); OUT_LINE ("$ACADVER"); OUT_LINE (" 1"); OUT_LINE ("AC1009"); OUT_LINE (" 9"); OUT_LINE ("$EXTMIN"); OUT_LINE (" 10"); OUT1 (" %f\n", (double)llx); OUT_LINE (" 20"); OUT1 (" %f\n", (double)lly); OUT_LINE (" 30"); OUT_LINE (" 0.000000"); OUT_LINE (" 9"); OUT_LINE ("$EXTMAX"); OUT_LINE (" 10"); OUT1 (" %f\n", (double)urx); OUT_LINE (" 20"); OUT1 (" %f\n", (double)ury); OUT_LINE (" 30"); OUT_LINE (" 0.000000"); OUT_LINE (" 0"); OUT_LINE ("ENDSEC"); output_layer(dxf_file, shape); OUT_LINE (" 0"); OUT_LINE ("SECTION"); OUT_LINE (" 2"); OUT_LINE ("ENTITIES"); out_splines(dxf_file, shape); OUT_LINE (" 0"); OUT_LINE ("ENDSEC"); OUT_LINE (" 0"); OUT_LINE ("EOF"); return 0; }
int output_sk_writer(FILE* file, gchar* name, int llx, int lly, int urx, int ury, at_output_opts_type * opts, spline_list_array_type shape, at_msg_func msg_func, gpointer msg_data, gpointer user_data) { fputs("##Sketch 1 0\n", file); fputs("document()\n", file); fputs("layer('Layer 1',1,1,0,0)\n", file); fputs("guess_cont()\n", file); out_splines(file, shape); return 0; }
int output_er_writer(FILE * file, gchar * name, int llx, int lly, int urx, int ury, at_output_opts_type * opts, spline_list_array_type shape, at_msg_func msg_func, gpointer msg_data, gpointer user_data) { int result; unsigned width, height; result = output_er_header(file, name, llx, lly, urx, ury); if (result != 0) return result; width = urx - llx; height = ury - lly; out_splines(file, shape, width, height, opts); return 0; }
int output_epd_writer(FILE* epd_file, gchar* name, int llx, int lly, int urx, int ury, at_output_opts_type * opts, spline_list_array_type shape, at_msg_func msg_func, gpointer msg_data, gpointer user_data) { int result; result = output_epd_header(epd_file, name, llx, lly, urx, ury); if (result != 0) return result; out_splines(epd_file, shape); return 0; }