From 18dd08323fb4f5dde730ee742ea76a6a646f18ad Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 16 Mar 2008 10:13:20 +0000 Subject: [PATCH] added glow filter --- lib/modules/swffilter.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/modules/swffilter.c b/lib/modules/swffilter.c index 6ca8739..38a026e 100644 --- a/lib/modules/swffilter.c +++ b/lib/modules/swffilter.c @@ -9,6 +9,8 @@ void swf_SetFilter(TAG*tag, FILTER*filter) swf_SetFixed(tag, f->blury); U8 flags = f->passes << 3; swf_SetU8(tag, flags); + } else if(filter->type == FILTERTYPE_GLOW) { + FILTER_GLOW*f = (FILTER_GLOW*)filter; } else if(filter->type == FILTERTYPE_DROPSHADOW) { FILTER_DROPSHADOW*f = (FILTER_DROPSHADOW*)filter; swf_SetRGBA(tag, &f->color); @@ -63,6 +65,19 @@ FILTER*swf_GetFilter(TAG*tag) U8 flags = swf_GetU8(tag); f->passes = (flags&15)<<3; return (FILTER*)f; + } else if(type == FILTERTYPE_GLOW) { + FILTER_GLOW* f = (FILTER_GLOW*)rfx_calloc(sizeof(FILTER_GLOW)); + f->type = type; + swf_GetRGBA(tag, &f->rgba); + f->blurx = swf_GetFixed(tag); + f->blury = swf_GetFixed(tag); + f->strength = swf_GetFixed8(tag); + U8 flags = swf_GetU8(tag); + f->passes = flags&31; + f->innerglow = (flags>>7)&1; + f->knockout = (flags>>6)&1; + f->composite = (flags>>5)&1; + return (FILTER*)f; } else if(type == FILTERTYPE_GRADIENTGLOW) { FILTER_GRADIENTGLOW* f = (FILTER_GRADIENTGLOW*)rfx_calloc(sizeof(FILTER_GRADIENTGLOW)); f->type = type; @@ -143,3 +158,9 @@ FILTER*swf_NewFilter(U8 type) f->type = type; return f; } + +void swf_DeleteFilter(FILTER*f) +{ + //FIXME + free(f); +} -- 1.7.10.4