#include "../art/libart.h"
#include "swf.h"
#include "../gfxpoly.h"
+#include "../png.h"
#define CHARDATAMAX 8192
#define CHARMIDX 0
int config_opennewwindow;
int config_ignoredraworder;
int config_drawonlyshapes;
+ int config_frameresets;
int config_linknameurl;
int config_jpegquality;
int config_storeallcharacters;
TAG *tag;
int currentswfid;
+ int startids;
int depth;
int startdepth;
int linewidth;
int clippos;
/* image cache */
+ /*
int pic_xids[1024];
int pic_yids[1024];
int pic_ids[1024];
int pic_width[1024];
int pic_height[1024];
int picpos;
+ */
int frameno;
int lastframeno;
swf_SetU16(i->tag,i->depth);
}
i->depth = i->startdepth;
+
+ if(i->config_frameresets) {
+ for(i->currentswfid;i->currentswfid>i->startids;i->currentswfid--) {
+ i->tag = swf_InsertTag(i->tag,ST_FREECHARACTER);
+ swf_SetU16(i->tag,i->currentswfid);
+ }
+ i->currentswfid = i->startids;
+ }
}
static void setBackground(gfxdevice_t*dev, int x1, int y1, int x2, int y2)
swf_SetRGB(i->tag,&rgb);
i->startdepth = i->depth = 0;
+ i->startids = i->currentswfid = 0;
}
static void startshape(gfxdevice_t*dev)
i->config_enablezlib = atoi(value);
} else if(!strcmp(name, "bboxvars")) {
i->config_bboxvars = atoi(value);
+ } else if(!strcmp(name, "frameresets")) {
+ i->config_frameresets = atoi(value);
} else if(!strcmp(name, "showclipshapes")) {
i->config_showclipshapes = atoi(value);
} else if(!strcmp(name, "reordertags")) {
printf("insertstop put an ActionScript \"STOP\" tag in every frame\n");
printf("protect add a \"protect\" tag to the file, to prevent loading in the Flash editor\n");
printf("flashversion=<version> the SWF fileversion (6)\n");
+ printf("framerate=<fps> SWF framerate\n");
printf("minlinewidth=<width> convert horizontal/vertical boxes smaller than this width to lines (0.05) \n");
printf("simpleviewer Add next/previous buttons to the SWF\n");
printf("animate insert a showframe tag after each placeobject (animate draw order of PDF files)\n");
printf("jpegquality=<quality> set compression quality of jpeg images\n");
+ printf("splinequality=<value> Set the quality of spline convertion to value (0-100, default: 100).\n");
} else {
return 0;
}
if(cacheid<=0) {
bitid = getNewID(dev);
+
i->tag = swf_AddImage(i->tag, bitid, mem, sizex, sizey, i->config_jpegquality);
addImageToCache(dev, mem, sizex, sizey);
} else {