[cairo] propsal for blur-API in cairo

Bill Spitzak spitzak at gmail.com
Thu Jun 18 22:20:07 PDT 2009


Gerdus van Zyl wrote:
> see below how I imagine a filters api would look like. Note I'm not a
> C coder so it's probably unrealistic,etc...

Once again this proposal is to somehow blur everything that is drawn 
rather than just the contents of source surfaces.

This is interesting but I believe may be far harder to implement, and 
may not be worth it if in fact users only want to blur the contents of a 
source image. An alternative is to add the blur to the source image, 
just like you can transform it, etc.

As the arguments for the various blurs are completely different, I would 
prefer to see different calls for each of them, rather than a structure 
where only some of the fields are used depending on the blur.

Possibly something like this to build an entire compositing tree:

cairo_set_source_surface(...) // this resets all the filtering
cairo_add_source_filter(CAIRO_BLUR, width, height);
cairo_add_source_filter(...); // you can add multiple ones
cairo_add_source_surface(...); // pushes *another* source onto the stack
cairo_add_source_filter(CAIRL_MERGE_OVER...); // does "over" of the two 
on stack



More information about the cairo mailing list