1 #ifndef __poly_convert_h__
2 #define __poly_convert_h__
4 #include "../gfxdevice.h"
7 typedef struct _polywriter
9 void(*moveto)(struct _polywriter*, int32_t x, int32_t y);
10 void(*lineto)(struct _polywriter*, int32_t x, int32_t y);
11 void(*setgridsize)(struct _polywriter*, double g);
12 void*(*finish)(struct _polywriter*);
16 void gfxpolywriter_init(polywriter_t*w);
17 gfxpoly_t* gfxpoly_from_gfxline(gfxline_t*line, double gridsize);
18 gfxpoly_t* gfxpoly_from_file(const char*filename, double gridsize);
19 void gfxpoly_destroy(gfxpoly_t*poly);
21 #endif //__poly_convert_h__