X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxfilter.h;h=6de443e3267fedc3024f49537193fc9a2f209768;hp=c34de38e12baf7924ef4ce9c69975636b5172e61;hb=905772d04a1c2dd73802c6dde5bd50e9701b7af6;hpb=c34a9e0500bc5141864683ff548b8979f611747b diff --git a/lib/gfxfilter.h b/lib/gfxfilter.h index c34de38..6de443e 100644 --- a/lib/gfxfilter.h +++ b/lib/gfxfilter.h @@ -28,10 +28,19 @@ extern "C" { #endif +typedef enum {gfxfilter_none, gfxfilter_onepass, gfxfilter_twopass} gfxfiltertype_t; + +typedef struct _gfxfilterbase +{ + gfxfiltertype_t type; +} gfxfilterbase_t; + typedef struct _gfxfilter { + gfxfiltertype_t type; int num_passes; const char*name; + int pass; int (*setparameter)(struct _gfxfilter*in, const char*key, const char*value, struct _gfxdevice*out); @@ -55,6 +64,7 @@ typedef struct _gfxfilter typedef struct _gfxtwopassfilter { + gfxfiltertype_t type; gfxfilter_t pass1; gfxfilter_t pass2; } gfxtwopassfilter_t; @@ -62,6 +72,15 @@ typedef struct _gfxtwopassfilter gfxdevice_t*gfxfilter_apply(gfxfilter_t*filter, gfxdevice_t*dev); gfxdevice_t*gfxtwopassfilter_apply(gfxtwopassfilter_t*filter, gfxdevice_t*dev); +typedef struct _gfxfilterchain { + gfxfilterbase_t*filter; + struct _gfxfilterchain*next; +} gfxfilterchain_t; + +gfxfilterchain_t* gfxfilterchain_parse(const char*filterexpr); +gfxdevice_t* gfxfilterchain_apply(gfxfilterchain_t*chain, gfxdevice_t*dev); +void gfxfilterchain_destroy(gfxfilterchain_t*chain); + #define wrap_filter(dev, name, args...) \ {gfxfilter_t f_##name; \ gfxfilter_##name##_init(&f_##name, ## args); \ @@ -77,8 +96,8 @@ gfxdevice_t*gfxtwopassfilter_apply(gfxtwopassfilter_t*filter, gfxdevice_t*dev); /* known filters */ void gfxfilter_maketransparent_init(gfxfilter_t*f, U8 alpha); void gfxtwopassfilter_remove_font_transforms_init(gfxtwopassfilter_t*f); +void gfxtwopassfilter_one_big_font_init(gfxtwopassfilter_t*f); -void check_filter(); #ifdef __cplusplus }