fixed masked image bug
[swftools.git] / lib / gfxpoly / convert.h
1 #ifndef __poly_convert_h__
2 #define __poly_convert_h__
3
4 #include "../gfxdevice.h"
5 #include "../gfxtools.h"
6 #include "poly.h"
7
8 typedef struct _polywriter
9 {
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*);
14     void*internal;
15 } polywriter_t;
16
17 void gfxdrawer_target_poly(gfxdrawer_t*d, double gridsize);
18
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);
23
24 gfxline_t*gfxline_from_gfxpoly(gfxpoly_t*poly);
25 gfxline_t*gfxline_from_gfxpoly_updown(gfxpoly_t*poly); // preserves up/down
26
27 gfxline_t* gfxpoly_circular_to_evenodd(gfxline_t*line, double gridsize);
28 gfxpoly_t* gfxpoly_createbox(double x1, double y1,double x2, double y2, double gridsize);
29
30 #endif //__poly_convert_h__