added background color support to swf_Render*.
[swftools.git] / lib / rfxswf.h
index 4e2fa40..fc39f3f 100644 (file)
@@ -30,6 +30,7 @@ extern "C" {
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <math.h>
 #include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -201,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
@@ -557,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);
@@ -960,6 +962,8 @@ typedef struct RENDERBUF
 } RENDERBUF;
 
 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);