X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxpoly%2Fconvert.h;h=f0a8fb976f99a8ccafaa4eac9ddf7571ee2ca939;hp=8ac8a86ebb7cda71db364def10d2abfc63d38720;hb=e0a27e1bd83ff2d60745dd6030e0f5ef7ef97b82;hpb=3513ae007a04da02f11cdca9f0d08ddda9eac245 diff --git a/lib/gfxpoly/convert.h b/lib/gfxpoly/convert.h index 8ac8a86..f0a8fb9 100644 --- a/lib/gfxpoly/convert.h +++ b/lib/gfxpoly/convert.h @@ -1,13 +1,29 @@ #ifndef __poly_convert_h__ #define __poly_convert_h__ +#include "../gfxdevice.h" +#include "../gfxtools.h" #include "poly.h" -gfxpoly_t* gfxpoly_from_gfxline(gfxline_t*line, double gridsize); +typedef struct _polywriter +{ + void(*moveto)(struct _polywriter*, int32_t x, int32_t y); + void(*lineto)(struct _polywriter*, int32_t x, int32_t y); + void(*setgridsize)(struct _polywriter*, double g); + void*(*finish)(struct _polywriter*); + void*internal; +} polywriter_t; + +void gfxdrawer_target_poly(gfxdrawer_t*d, double gridsize); + +void gfxpolywriter_init(polywriter_t*w); +gfxpoly_t* gfxpoly_from_fill(gfxline_t*line, double gridsize); gfxpoly_t* gfxpoly_from_file(const char*filename, double gridsize); -gfxcompactpoly_t* gfxcompactpoly_from_gfxline(gfxline_t*line, double gridsize); -gfxcompactpoly_t* gfxcompactpoly_from_file(const char*filename, double gridsize); +void gfxpoly_destroy(gfxpoly_t*poly); + +gfxline_t*gfxline_from_gfxpoly(gfxpoly_t*poly); -void gfxcompactpoly_free(gfxcompactpoly_t*poly); +gfxline_t* gfxpoly_circular_to_evenodd(gfxline_t*line, double gridsize); +gfxpoly_t* gfxpoly_createbox(double x1, double y1,double x2, double y2, double gridsize); #endif //__poly_convert_h__