1 #ifndef __poly_convert_h__
2 #define __poly_convert_h__
4 #include "../gfxdevice.h"
5 #include "../gfxtools.h"
8 typedef struct _polywriter
10 void(*moveto)(struct _polywriter*, int32_t x, int32_t y);
11 void(*lineto)(struct _polywriter*, int32_t x, int32_t y);
12 void(*setgridsize)(struct _polywriter*, double g);
13 void*(*finish)(struct _polywriter*);
17 void gfxdrawer_target_poly(gfxdrawer_t*d, double gridsize);
19 void gfxpolywriter_init(polywriter_t*w);
20 gfxpoly_t* gfxpoly_from_fill(gfxline_t*line, double gridsize);
21 gfxpoly_t* gfxpoly_from_file(const char*filename, double gridsize);
22 void gfxpoly_destroy(gfxpoly_t*poly);
24 gfxline_t*gfxline_from_gfxpoly(gfxpoly_t*poly);
26 gfxline_t* gfxpoly_circular_to_evenodd(gfxline_t*line, double gridsize);
27 gfxpoly_t* gfxpoly_createbox(double x1, double y1,double x2, double y2, double gridsize);
29 #endif //__poly_convert_h__