X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fswfoutput.cc;h=330c89064a59aecd31b1db1626b20ad37c5b9b9e;hb=41e2677f86bb98be45f5cf8d82abbb3b95e5f043;hp=75efd2c57b0dcecd11d6484850a29c6750827334;hpb=1f237fb411319057ae1e4f779e511cea0e206858;p=swftools.git diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 75efd2c..330c890 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -36,6 +36,7 @@ int drawonlyshapes=0; int jpegquality=85; int storeallcharacters=0; int enablezlib=0; +int insertstoptag=0; static int flag_protected = 0; typedef unsigned char u8; @@ -646,7 +647,7 @@ SWFFont::~SWFFont() swflastx=0; swflasty=0; - swf_SetU8(ftag,0x10); //0 fill bits, 0 linestyle bits + swf_SetU8(ftag,0x10); //1 fill bits, 0 linestyle bits SHAPE s; s.bits.fill = 1; s.bits.line = 0; @@ -969,6 +970,14 @@ static void endpage(struct swfoutput*obj) endtext(); while(clippos) swfoutput_endclip(obj); + + if(insertstoptag) { + ActionTAG*atag=0; + atag = action_Stop(atag); + atag = action_End(atag); + tag = swf_InsertTag(tag,ST_DOACTION); + swf_ActionSet(tag,atag); + } tag = swf_InsertTag(tag,ST_SHOWFRAME); } @@ -1343,23 +1352,28 @@ static void drawimage(struct swfoutput*obj, int bitid, int sizex,int sizey, if(y4>ymax) ymax=y4; if(x4linewidth,&obj->strokergb); //fsid = ShapeAddSolidFillStyle(shape,&obj->fillrgb); - fsid = swf_ShapeAddBitmapFillStyle(shape,&m,bitid,0); + fsid = swf_ShapeAddBitmapFillStyle(shape,&m,bitid,1); swf_SetU16(tag, myshapeid); r.xmin = (int)(xmin*20); r.ymin = (int)(ymin*20); @@ -1472,11 +1486,11 @@ int swfoutput_drawimagelossless(struct swfoutput*obj, RGBA*mem, int sizex,int si return bitid; } -int swfoutput_drawimagelossless256(struct swfoutput*obj, U8*mem, RGBA*pal, int sizex,int sizey, +int swfoutput_drawimagelosslessN(struct swfoutput*obj, U8*mem, RGBA*pal, int sizex,int sizey, double x1,double y1, double x2,double y2, double x3,double y3, - double x4,double y4) + double x4,double y4, int n) { TAG*oldtag; U8*mem2 = 0; @@ -1505,7 +1519,7 @@ int swfoutput_drawimagelossless256(struct swfoutput*obj, U8*mem, RGBA*pal, int s oldtag = tag; tag = swf_InsertTag(tag,ST_DEFINEBITSLOSSLESS2); swf_SetU16(tag, bitid); - if(swf_SetLosslessBitsIndexed(tag,sizex,sizey,mem, pal, 256)<0) { + if(swf_SetLosslessBitsIndexed(tag,sizex,sizey,mem, pal, n)<0) { swf_DeleteTag(tag); tag = oldtag; return -1;