// folding/unfolding:
void swf_FoldAll(SWF*swf);
+void swf_UnFoldAll(SWF*swf);
void swf_FoldSprite(TAG*tag);
+void swf_UnFoldSprite(TAG*tag);
// basic routines:
void swf_GetRGB(TAG * t, RGBA * col);
void swf_GetRGBA(TAG * t, RGBA * col);
void swf_GetGradient(TAG * t, GRADIENT * gradient, char alpha);
-void swf_GetMorphGradient(TAG * tag, GRADIENT * gradient1, GRADIENT * gradient2);
int swf_SetU8(TAG * t,U8 v); // resets Bitcount
int swf_SetU16(TAG * t,U16 v);
U32 bitlen; // length of data in bits
} SHAPE, * LPSHAPE;
-/* data/bitlen can be expanded into a SHAPELINE record using
- parseShapeData: */
+/* SHAPE can be converted into SHAPE2: */
+
+struct _SHAPELINE;
+typedef struct _SHAPE2
+{
+ LINESTYLE * linestyles;
+ int numlinestyles;
+ FILLSTYLE* fillstyles;
+ int numfillstyles;
+ struct _SHAPELINE * lines;
+ SRECT* bbox; // may be NULL
+} SHAPE2;
+
typedef struct _SHAPELINE
{
enum {moveTo, lineTo, splineTo} type;
int fillstyle0;
int fillstyle1;
int linestyle;
- struct _SHAPELINE*next;
+ struct _SHAPELINE * next;
} SHAPELINE;
// Shapes
int swf_ShapeSetEnd(TAG * t);
SHAPELINE* swf_ParseShapeData(U8*data, int bits, int fillbits, int linebits);
-SRECT swf_GetBoundingBox(SHAPELINE*shape);
+SHAPE2* swf_ShapeToShape2(SHAPE*shape);
+SHAPE* swf_Shape2ToShape(SHAPE2*shape);
+SRECT swf_GetShapeBoundingBox(SHAPELINE*shape);
+int swf_SetShape2(TAG*tag, SHAPE2*shape);
+void swf_Shape2Free(SHAPE2 * s);
// swffont.c
int swf_FontExtract_DefineTextCallback(int id,SWFFONT * f,TAG * t,int jobs,
void(*callback)(int*chars, int nr, int id));
-// the following two functions are obsolete and will be removed soon
-int swf_FontExport(int handle,SWFFONT * f);
-int swf_FontImport(int handle,SWFFONT * * f);
-
void swf_WriteFont(SWFFONT* font, char* filename);
SWFFONT* swf_ReadFont(char* filename);
void swf_SetEditText(TAG*tag, U16 flags, SRECT r, char*text, RGBA*color,
int maxlength, U16 font, U16 height, EditTextLayout*layout, char*variable);
+void swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale);
+
// swfdump.c
void swf_DumpHeader(FILE * f,SWF * swf);
// swfobject.c
-// The following routines only use placeobject2:
+// The following 3 routines only use placeobject2:
int swf_ObjectPlace(TAG * t,U16 id,U16 depth,MATRIX * m,CXFORM * cx,U8 * name);
int swf_ObjectPlaceClip(TAG * t,U16 id,U16 depth,MATRIX * m,CXFORM * cx,U8 * name, U16 clipaction);