From 064caea40b3bcb69d965fa2b0d6df268cc0735b4 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 12 Jun 2002 20:34:34 +0000 Subject: [PATCH] new function swf_GetMorphGradient --- lib/rfxswf.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/rfxswf.c b/lib/rfxswf.c index 127984c..4a7035c 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -298,6 +298,29 @@ void swf_GetGradient(TAG * tag, GRADIENT * gradient, char alpha) } } +void swf_GetMorphGradient(TAG * tag, GRADIENT * gradient1, GRADIENT * gradient2) +{ + GRADIENT dummy1; + GRADIENT dummy2; + int t; + if(!gradient1) + gradient1 = &dummy1; + if(!gradient2) + gradient2 = &dummy2; + gradient1->num = + gradient2->num = swf_GetU8(tag); + for(t=0;tnum;t++) + { + int s=t; + if(s>=8) //FIXME + s=7; + gradient1->ratios[t] = swf_GetU8(tag); + swf_GetRGBA(tag, &gradient1->rgba[t]); + gradient2->ratios[t] = swf_GetU8(tag); + swf_GetRGBA(tag, &gradient2->rgba[t]); + } +} + int swf_CountBits(U32 v,int nbits) { int n = 33; U32 m = 0x80000000; -- 1.7.10.4