X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxpoly%2Fconvert.c;h=f404dfc24b607e99891391cbb023fd7a1898be23;hp=5615612c1a7f9f45a0e8ca0292235f2dc5270d93;hb=ae7c92fe5721f97e786a8bbe9153eadbf292460d;hpb=bf04757cd94e94c1f67fa3d2a4e3e59fa5bce0c0 diff --git a/lib/gfxpoly/convert.c b/lib/gfxpoly/convert.c index 5615612..f404dfc 100644 --- a/lib/gfxpoly/convert.c +++ b/lib/gfxpoly/convert.c @@ -3,16 +3,16 @@ #include #include #include "../gfxdevice.h" +#include "../mem.h" #include "poly.h" static edge_t*edge_new(int x1, int y1, int x2, int y2) { - edge_t*s = malloc(sizeof(edge_t)); + edge_t*s = rfx_calloc(sizeof(edge_t)); s->a.x = x1; s->a.y = y1; s->b.x = x2; s->b.y = y2; - s->next = 0; return s; } @@ -29,7 +29,7 @@ static inline void gfxpoly_add_edge(gfxpoly_t*poly, double _x1, double _y1, doub } } -gfxpoly_t* gfxpoly_fillToPoly(gfxline_t*line, double gridsize) +gfxpoly_t* gfxpoly_from_gfxline(gfxline_t*line, double gridsize) { gfxpoly_t*p = gfxpoly_new(gridsize);