Let me give some further thoughts on your proposed api:

> it should be LIKE the clipping api
>
> filt = evas_object_filter_add();
> evas_object_resize(filt, 200, 200);
> evas_object_filter_effect_set(filt, EVAS_FILTER_CHILDREN_ONLY);
> evas_object_filter_type_set(filt, "blur/gaussian");
> evas_object_filter_parameter_int_set(filt, "radius", 10);
> evas_object_filter_add(filt, obj_to_blur);
> evas_object_show(filt);
> ...
>
> (for example - this is not fixed, but it is an IDEA).
>   

      This has some interesting possibilities:

1. Since filters are new types of objs, they can be used to affect
the canvas (as mentioned in before), as well as modifiers of objs.

2. If filters are allowed to 'filter' other filters, then one could
replace your proposed function:
   evas_object_filter_add(filt, obj_to_filter);
with one to just 'set' a filter:
   evas_object_filter_set(filt, obj_to_filter);
and thus one could start by supporting one filter on an obj (so that
filtering a filter would be disabled), and if deemed necessary could
later allow for the general case.

3. The type/params method for specifying filters/properties is good
for things like loadable filters, and one could have a "gl-shader"
type with a string param named "program" which would accept the program
defining the thing, and others for specifying values of variables.
   It might also be desirable to have some 'built-in' filters though
which would not need to go thru the generic api above.


      There's one thing about this approach to filters as objs,
namely the issue of things like the pos on the canvas of the filter
object and its relation to the effect on the obj the filter is
set on -- assuming such a thing as a filter's pos/size makes sense
at all (eg. as if applied to the subimage defined by the pos/size
of the filter?). This could have semantic issues with filters set
on different objs, ie. if filters have absolute pos rel to the
canvas when they are set on objs.
      In paticular since I believe an immediate mode 'obj-draw' func
is important, I wonder if maybe filters set on an obj should have
that its pos is interpreted rel to the target obj (instead of the
canvas). Alternatively, assuming pos/size makes sense for a given
filter, filters set on an obj could be taken as always 'at' the
obj's origin, and of size equal to the obj's.. or some mixture of
the two.. or what? Is it worth it to consider such things as the
size and pos of a filter 'set' on an object?



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to