> > > ...
> > > ...
> > 
> >     The file "edje_etk.c" has several lines where there is
> > code like:   evas_object_color_set(o, 255, 255, 255, 0);
> > 
> >     Are you *certain* that you want things like that?
> > (as opposed to perhaps evas_object_color_set(o, 0, 0, 0, 0))
> > 
> >    jose.
> > 
> both of these have an alpha of 0, so what's the difference?
> 

        They are different quadruples of numbers.. unless you
really know what may happen when you pass the former, it's not
good practice to do this (asuming that in this particular case
he really meant to set the alpha to 0).

   Evas will only guarantee to give the standard compositing
   results when premul colors are passed to it.

        Even in this particular case where the alpha is 0 (and
when you do this kind of thing, it's very easy to also do it
for an alpha that isn't 0), you may still find that it makes a
'difference' -- eg. there are some tests that evas might do to
determine if a 'color' is zero, and do whatever is aproppiate
then.. but internally, the color may no longer exist as a
quadruple of ints, but rather as a single unsigned int, and then
it will simply test wether this is zero, rather than split the
color apart again, etc. This could merely slow things down.. or
possibly other stuff.

        In other words: unless you reaaaally know that you want
to use non-premul colors (for some special reason, and there are
some) --- use premul colors!

        Ye has been warned.

        jose.



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to