X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.c;h=ae33ad5139946802e8b2a8b17121b7aebd31a0a9;hb=08d4f2d6189db011641111a11c53da37424942fc;hp=f0ece33fbff8db96d6b13665fd57da1d94e96d9f;hpb=8825d41ef224eafc985545b620046e2a27ef46b9;p=swftools.git diff --git a/lib/rfxswf.c b/lib/rfxswf.c index f0ece33..ae33ad5 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -542,11 +542,11 @@ void swf_ExpandRect3(SRECT*src, SPOINT center, int radius) if(center.x - radius < src->xmin) src->xmin = center.x - radius; if(center.x + radius > src->xmax) - src->xmax = center.x - radius; + src->xmax = center.x + radius; if(center.y - radius < src->ymin) src->ymin = center.y - radius; if(center.y + radius > src->ymax) - src->ymax = center.y - radius; + src->ymax = center.y + radius; } SPOINT swf_TurnPoint(SPOINT p, MATRIX* m) { @@ -1488,6 +1488,21 @@ int swf_WriteCGI(SWF * swf) return swf_WriteSWF(fileno(stdout),swf); } +SWF* swf_CopySWF(SWF*swf) +{ + SWF*nswf = rfx_alloc(sizeof(SWF)); + memcpy(nswf, swf, sizeof(SWF)); + nswf->firstTag = 0; + TAG*tag = swf->firstTag; + TAG*ntag = 0; + while(tag) { + ntag = swf_CopyTag(ntag, tag); + if(!nswf->firstTag) + nswf->firstTag = ntag; + } + return nswf; +} + void swf_FreeTags(SWF * swf) // Frees all malloc'ed memory for tags { TAG * t = swf->firstTag; @@ -1514,3 +1529,4 @@ void swf_FreeTags(SWF * swf) // Frees all malloc'ed memory for t #include "modules/swfaction.c" #include "modules/swfsound.c" #include "modules/swfdraw.c" +#include "modules/swfrender.c"