X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.h;h=fc39f3fa761c93b7b9a6d6ec877f5df8fd7bb1ec;hb=e6b4ceefbdfaa2e2a2837105b4255262bae797de;hp=3e0dfcd109e20f1f8e83694643c928664527e4c6;hpb=424c7018f80ecce81f59aace2bc61bba9fcae4fe;p=swftools.git diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 3e0dfcd..fc39f3f 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -30,6 +30,7 @@ extern "C" { #include #include +#include #include #include #include @@ -76,6 +77,10 @@ void* rfx_alloc(int size); void* rfx_calloc(int size); void* rfx_realloc(void*data, int size); void rfx_free(void*data); +#ifdef MEMORY_INFO +long rfx_memory_used(); +char* rfx_memory_used_str(); +#endif // SWF Types @@ -197,6 +202,7 @@ int swf_WriteSWF(int handle,SWF * swf); // Writes SWF to file, returns lengt int swf_WriteSWC(int handle, SWF * swf); // for convenience, equal to swf->compressed=1;swf_WriteSWF(..) int swf_WriteCGI(SWF * swf); // Outputs SWF with valid CGI header to stdout void swf_FreeTags(SWF * swf); // Frees all malloc'ed memory for swf +SWF* swf_CopySWF(SWF*swf); // for streaming: int swf_WriteHeader(int handle,SWF * swf); // Writes Header of swf to file @@ -458,6 +464,9 @@ void swf_ParseDefineShape(TAG*tag, SHAPE2*shape); void swf_Shape2ToShape(SHAPE2*shape2, SHAPE*shape); void swf_SetShape2(TAG*tag, SHAPE2*shape2); +void swf_RecodeShapeData(U8*data, int bitlen, int in_bits_fill, int in_bits_line, + U8**destdata, U32*destbitlen, int out_bits_fill, int out_bits_line); + // swfdraw.c void swf_Shape10DrawerInit(drawer_t*draw, TAG*tag); @@ -550,7 +559,7 @@ typedef struct _EditTextLayout U16 leading; } EditTextLayout; -int swf_FontEnumerate(SWF * swf,void (*FontCallback) (U16,U8*)); +int swf_FontEnumerate(SWF * swf,void (*FontCallback) (void*,U16,U8*), void*self); // -> void fontcallback(U16 id,U8 * name); returns number of defined fonts int swf_FontExtract(SWF * swf,int id,SWFFONT ** f); @@ -952,7 +961,9 @@ typedef struct RENDERBUF void*internal; } RENDERBUF; -void swf_Render_Init(RENDERBUF*buf, int posx, int posy, int width, int height); +void swf_Render_Init(RENDERBUF*buf, int posx, int posy, int width, int height, char antialize, int scale); +void swf_Render_SetBackground(RENDERBUF*buf, RGBA*img, int width, int height); +void swf_Render_SetBackgroundColor(RENDERBUF*buf, RGBA color); RGBA* swf_Render(RENDERBUF*dest); void swf_RenderShape(RENDERBUF*dest, SHAPE2*shape, MATRIX*m, CXFORM*c, U16 depth,U16 clipdepth); void swf_Render_AddImage(RENDERBUF*buf, U16 id, RGBA*img, int width, int height);