X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdevices%2Fswf.c;h=366af3c34ef9814215e690f53c0d76db9665dd93;hb=fb7d8f980e02200551e59656a9775933134ebebb;hp=ad897fdfe62557fd961ad6afe8ca8cda8a80d645;hpb=dbc9adb7ae63afb520ab7d048739ef92a18d3b7f;p=swftools.git diff --git a/lib/devices/swf.c b/lib/devices/swf.c index ad897fd..366af3c 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -877,6 +877,9 @@ static void setBackground(gfxdevice_t*dev, int x1, int y1, int x2, int y2) void gfxdevice_swf_init(gfxdevice_t* dev) { memset(dev, 0, sizeof(gfxdevice_t)); + + dev->name = "swf"; + dev->internal = init_internal_struct(); dev->startpage = swf_startframe; @@ -1215,6 +1218,8 @@ void swfoutput_finalize(gfxdevice_t*dev) if(i->config_enablezlib || i->config_flashversion>=6) { i->swf->compressed = 1; } + + swf_Optimize(i->swf); } int swfresult_save(gfxresult_t*gfx, char*filename) @@ -1799,7 +1804,6 @@ int swf_setparameter(gfxdevice_t*dev, const char*name, const char*value) i->config_linkcolor.a); } else { - fprintf(stderr, "unknown parameter: %s (=%s)\n", name, value); return 0; } return 1; @@ -2006,6 +2010,7 @@ static void swf_startclip(gfxdevice_t*dev, gfxline_t*line) i->tag = swf_InsertTag(i->tag,ST_DEFINESHAPE3); RGBA col; memset(&col, 0, sizeof(RGBA)); + col.a = 255; SHAPE*shape; swf_ShapeNew(&shape); int fsid = swf_ShapeAddSolidFillStyle(shape,&col); @@ -2235,6 +2240,8 @@ static void swf_fill(gfxdevice_t*dev, gfxline_t*line, gfxcolor_t*color) swfoutput_internal*i = (swfoutput_internal*)dev->internal; if(line_is_empty(line)) return; + if(!color->a) + return; gfxbbox_t r = gfxline_getbbox(line); int is_outside_page = !is_inside_page(dev, r.xmin, r.ymin) || !is_inside_page(dev, r.xmax, r.ymax);