{
swfoutput_internal*i = (swfoutput_internal*)dev->internal;
if(i->currentswfid == 65535) {
- if(!id_error)
+ if(!id_error) {
msg("<error> ID Table overflow");
+ msg("<error> This file is too complex to render- SWF only supports 65536 shapes at once");
+ }
id_error=1;
i->overflow = 1;
exit(1);
{
swfoutput_internal*i = (swfoutput_internal*)dev->internal;
if(i->depth == 65535) {
- if(!id_error)
+ if(!id_error) {
msg("<error> Depth Table overflow");
+ msg("<error> This file is too complex to render- SWF only supports 65536 shapes at once");
+ }
id_error=1;
i->overflow = 1;
exit(1);
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;
if(i->config_enablezlib || i->config_flashversion>=6) {
i->swf->compressed = 1;
}
+
+ swf_Optimize(i->swf);
}
int swfresult_save(gfxresult_t*gfx, char*filename)
swfoutput_internal*i = (swfoutput_internal*)dev->internal;
gfxcoord_t lastx=0,lasty=0,px=0,py=0;
char lastwasmoveto;
+ int lines= 0, splines=0;
while(1) {
if(!line)
break;
/* check whether the next segment is zero */
if(line->type == gfx_moveTo) {
- msg("<trace> ======== moveTo %.2f %.2f", line->x, line->y);
moveto(dev, i->tag, line->x, line->y);
px = lastx = line->x;
py = lasty = line->y;
lastwasmoveto = 1;
} if(line->type == gfx_lineTo) {
- msg("<trace> ======== lineTo %.2f %.2f", line->x, line->y);
lineto(dev, i->tag, line->x, line->y);
px = line->x;
py = line->y;
lastwasmoveto = 0;
+ lines++;
} else if(line->type == gfx_splineTo) {
- msg("<trace> ======== splineTo %.2f %.2f", line->x, line->y);
plotxy_t s,p;
s.x = line->sx;p.x = line->x;
s.y = line->sy;p.y = line->y;
px = line->x;
py = line->y;
lastwasmoveto = 0;
+ splines++;
}
line = line->next;
}
+ msg("<trace> drawgfxline, %d lines, %d splines", lines, splines);
}
i->config_linkcolor.a);
} else {
- fprintf(stderr, "unknown parameter: %s (=%s)\n", name, value);
return 0;
}
return 1;
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);
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);