On Wed, 1 Aug 2007 12:08:59 -0300 "Gustavo Sverzut Barbieri"
<[EMAIL PROTECTED]> babbled:

> On 8/1/07, Enlightenment CVS <[EMAIL PROTECTED]> wrote:
> > Enlightenment CVS committal
> >
> > Author  : raster
> > Project : e17
> > Module  : libs/edje
> >
> > Dir     : e17/libs/edje/src/lib
> >
> >
> > Modified Files:
> >         edje_calc.c
> >
> >
> > Log Message:
> >
> >
> > DONT set color - bad. see comments
> >
> > ===================================================================
> > RCS file: /cvs/e/e17/libs/edje/src/lib/edje_calc.c,v
> > retrieving revision 1.106
> > retrieving revision 1.107
> > diff -u -3 -r1.106 -r1.107
> > --- edje_calc.c 8 Jul 2007 17:52:39 -0000       1.106
> > +++ edje_calc.c 1 Aug 2007 14:34:10 -0000       1.107
> > @@ -1325,7 +1325,8 @@
> >              if (p3.visible) evas_object_show(ep->object);
> >              else evas_object_hide(ep->object);
> >           }
> > -       else if (ep->part->type == EDJE_PART_TYPE_SWALLOW || ep->part->type
> > == EDJE_PART_TYPE_GROUP)
> > +       else if ((ep->part->type == EDJE_PART_TYPE_SWALLOW) ||
> > +                (ep->part->type == EDJE_PART_TYPE_GROUP))
> >           {
> >              evas_object_move(ep->object, ed->x + p3.x, ed->y + p3.y);
> >              evas_object_resize(ep->object, p3.w, p3.h);
> > @@ -1379,12 +1380,15 @@
> >
> >         if (ep->swallowed_object)
> >           {
> > -            evas_object_color_set(ep->swallowed_object,
> > -                                  (p3.color.r * p3.color.a) / 255,
> > -                                  (p3.color.g * p3.color.a) / 255,
> > -                                  (p3.color.b * p3.color.a) / 255,
> > -                                  p3.color.a);
> > -
> > +//// the below really is wrong - swallow color shouldnt affect swallowed
> > object +//// color - the edje color as a WHOLE should though - and that
> > should be +//// done via the clipper anyway. this created bugs when objects
> > had their +//// colro set and were swallowed - then had their color changed.
> > +//          evas_object_color_set(ep->swallowed_object,
> > +//                                (p3.color.r * p3.color.a) / 255,
> > +//                                (p3.color.g * p3.color.a) / 255,
> > +//                                (p3.color.b * p3.color.a) / 255,
> > +//                                p3.color.a);
> >              evas_object_move(ep->swallowed_object, ed->x + p3.x, ed->y +
> > p3.y); evas_object_resize(ep->swallowed_object, p3.w, p3.h);
> >              if (p3.visible) evas_object_show(ep->swallowed_object);
> 
> I disagree on this, being the proposal of this changed and discussed a
> bit with rephorm, who agreed.
> 
> Use case is: I have a part and want it to fade out/in. This part
> happens to be a swallowed object. This swallowed object happen to be
> another Edje or even GROUP ("group" automatically swallowed from the
> same file).
> 
> With every other part, I'd write 2 states, one with color 255 255 255
> 255 and other with 255 255 255 0, then write a "program" that have
> "action: STATE_SET "fade_out" 0.0" and "transition: LINEAR 1.0"
> 
> But with SWALLOW or GROUP I cannot. Why? No given reason other than
> "it was not done". So i did it.
> 
> However, it exposed old behavior of setting "color: 0 0 0 0" on
> swallows, previously used as RECT. Ok, it's quite hard to track and
> fix old mistakes, but does this justify commenting out? Or marking it
> as "really is wrong"?
> 
> Then you suggest "that should be done via the clipper anyway", ok, but
> it requires you to always have a clipper and know it so you can set
> its color, breaking the great semantics of Edje and its
> program/transitions.

there is a major problem with the color way - it directly interfered with the
COLOR of the swallowed object. it CHANGES it. if i swallowed a POLYGON - before
i swallow it the poly is red - after swallow it will be reset to whatever the
swallow color is - the object i swallowed no longer has its original color -
the swallow cannot MODULATE the swallowed object color by setting it - it SETS
it. you want to MODULATE - i.e. - multiply - and THAT requires a clip to do
that.

> That's why I disagree with this change and want my code back :-D
> 
> I thought that you had fixed this for every .edc in CVS, but if it's
> not the case I can try to wipe these myself.

no - that's not the problem. the problem is as above.

1. create red polygon or green rect or pink line or yellow text.
2. swallow it
3. object loses color and becomes white/whatever.

what you WANT is that the objects color is MULTIPLIED by the clip color - so it
stays "pink" but also can be faded out and stay pink. clip objects do that -
setting color does this on images and text (as the object contains multiple
colors thus the only sane way to interpret a color_set is to multiply). by
using a clip the color of the swallowed object can be modified separately
without interference from the edje swallowing it - edje can fade things in and
out, darken them, tint them etc. and this acts as a modifier on whatever color
the object itself has. if you do it the way you had - edje and whatever
owns/controls the swallowed object FIGHT over what the object color should be :)

> -- 
> Gustavo Sverzut Barbieri
> --------------------------------------
> Jabber: [EMAIL PROTECTED]
>    MSN: [EMAIL PROTECTED]
>   ICQ#: 17249123
>  Skype: gsbarbieri
> Mobile: +55 (81) 9927 0010
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to