X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.h;h=861e378048442b6ad071060fc1412fd5ee6b0016;hb=5bc790960480ec72730ee25fe60d45cf92f7439f;hp=512eaa951079e3bbde558a4718da37c660877fb5;hpb=acd7d05a6a78e476f0b9fa7c3d395d4456e8a33a;p=swftools.git diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 512eaa9..861e378 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -158,7 +158,9 @@ int swf_ReadHeader(struct reader_t*reader, SWF * swf); // Reads SWF Header vi // folding/unfolding: void swf_FoldAll(SWF*swf); +void swf_UnFoldAll(SWF*swf); void swf_FoldSprite(TAG*tag); +void swf_UnFoldSprite(TAG*tag); // basic routines: @@ -189,7 +191,6 @@ U32 swf_GetU32(TAG * t); 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); @@ -320,8 +321,19 @@ typedef struct _SHAPE // NEVER access a Shape-Struct directly ! 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; @@ -330,7 +342,7 @@ typedef struct _SHAPELINE int fillstyle0; int fillstyle1; int linestyle; - struct _SHAPELINE*next; + struct _SHAPELINE * next; } SHAPELINE; // Shapes @@ -360,7 +372,11 @@ int swf_ShapeSetCircle(TAG * t,SHAPE * s,S32 x,S32 y,S32 rx,S32 ry); 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 @@ -466,10 +482,6 @@ void swf_FontAddLayout(SWFFONT * f, int ascent, int descent, int leading); 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); @@ -488,6 +500,8 @@ int swf_TextPrintDefineText(TAG * t,SWFFONT * f); 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); @@ -754,7 +768,7 @@ void action_fixjump(ActionMarker m1, ActionMarker m2); // 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);