X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fdevices%2Fswf.c;h=4bf636eb3c9e662729e4cb18dfba941ea812f21b;hp=c23783b617ad10f71cce4d4682de7d16b1138030;hb=e0a27e1bd83ff2d60745dd6030e0f5ef7ef97b82;hpb=9e546e0ca2d4472b77020cfc745f281b7864e6f9 diff --git a/lib/devices/swf.c b/lib/devices/swf.c index c23783b..4bf636e 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -89,6 +89,7 @@ typedef struct _swfoutput_internal int config_enablezlib; int config_insertstoptag; int config_watermark; + int config_noclips; int config_flashversion; int config_reordertags; int config_showclipshapes; @@ -2021,6 +2022,8 @@ int swf_setparameter(gfxdevice_t*dev, const char*name, const char*value) i->config_caplinewidth = atof(value); } else if(!strcmp(name, "linktarget")) { i->config_linktarget = strdup(value); + } else if(!strcmp(name, "noclips")) { + i->config_noclips = atoi(value); } else if(!strcmp(name, "dumpfonts")) { i->config_dumpfonts = atoi(value); } else if(!strcmp(name, "animate")) { @@ -2313,6 +2316,8 @@ static void drawoutline(gfxdevice_t*dev, gfxline_t*line) static void swf_startclip(gfxdevice_t*dev, gfxline_t*line) { swfoutput_internal*i = (swfoutput_internal*)dev->internal; + if(i->config_noclips) + return; endtext(dev); endshape(dev); @@ -2379,6 +2384,8 @@ static void swf_startclip(gfxdevice_t*dev, gfxline_t*line) static void swf_endclip(gfxdevice_t*dev) { swfoutput_internal*i = (swfoutput_internal*)dev->internal; + if(i->config_noclips) + return; if(i->textid>=0) endtext(dev); if(i->shapeid>=0) @@ -2540,11 +2547,11 @@ static void swf_stroke(gfxdevice_t*dev, gfxline_t*line, gfxcoord_t width, gfxcol if(has_dots) gfxline_fix_short_edges(line); /* we need to convert the line into a polygon */ - gfxpoly_t* poly = gfxpoly_strokeToPoly(line, width, cap_style, joint_style, miterLimit); - gfxline_t*gfxline = gfxpoly_to_gfxline(poly); + gfxpoly_t* poly = gfxpoly_from_stroke(line, width, cap_style, joint_style, miterLimit, DEFAULT_GRID); + gfxline_t*gfxline = gfxline_from_gfxpoly(poly); dev->fill(dev, gfxline, color); gfxline_free(gfxline); - gfxpoly_free(poly); + gfxpoly_destroy(poly); return; }