X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=inline;f=lib%2Fmodules%2Fswftools.c;h=5881827156dc6bbf0ea3c4528346d7713e2b23bb;hb=92639540a5db28c4e5cbb87bad85fa4abb886308;hp=053acaf644594f11ecad8e6f643665363d04a0d1;hpb=196855b46ecbd65f92a971197954cc56d84f154c;p=swftools.git diff --git a/lib/modules/swftools.c b/lib/modules/swftools.c index 053acaf..5881827 100644 --- a/lib/modules/swftools.c +++ b/lib/modules/swftools.c @@ -409,7 +409,7 @@ void swf_GetMorphGradient(TAG * tag, GRADIENT * gradient1, GRADIENT * gradient2) #define DEBUG_ENUMERATE if(0) -static void enumerateUsedIDs_styles(TAG * tag, void (*callback)(TAG*, int, void*), void*callback_data, int num, int morph) +void enumerateUsedIDs_styles(TAG * tag, void (*callback)(TAG*, int, void*), void*callback_data, int num, int morph) { U16 count; int t; @@ -904,6 +904,14 @@ U8 swf_isShapeTag(TAG*tag) return 0; } +U8 swf_isPlaceTag(TAG*tag) +{ + if(tag->id == ST_PLACEOBJECT || + tag->id == ST_PLACEOBJECT2) + return 1; + return 0; +} + U8 swf_isImageTag(TAG*tag) { if(tag->id == ST_DEFINEBITSJPEG || @@ -1113,3 +1121,22 @@ void swf_SetDefineBBox(TAG * tag, SRECT newbbox) } } +RGBA swf_GetSWFBackgroundColor(SWF*swf) +{ + TAG*t=swf->firstTag; + RGBA color; + color.r = color.b = color.g = 0; + color.a = 255; + while(t) { + if(t->id == ST_SETBACKGROUNDCOLOR) { + swf_SetTagPos(t, 0); + color.r = swf_GetU8(t); + color.g = swf_GetU8(t); + color.b = swf_GetU8(t); + break; + } + t=t->next; + } + return color; +} +