X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswffilter.c;h=38a026e8024101f03db8e88a221b152aaf0eeea5;hb=18dd08323fb4f5dde730ee742ea76a6a646f18ad;hp=6ca873907b4e51bd91020b213ccaabda97aab77d;hpb=5685d9a6e2c20dfb3c7dde92361ec62fcd13f0d6;p=swftools.git 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); +}