[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] E17 'todo'



On Sun, 30 Jul 2006 22:47:23 -0500 brian.mattern@gmail.com babbled:

> On Mon, Jul 31, 2006 at 10:36:29AM +0900, Carsten Haitzler wrote:
> > On Mon, 31 Jul 2006 00:37:42 GMT "jose_ogp@juno.com" <jose_ogp@juno.com>
> > babbled:
> > 
> > > 
> > > 	As part of a recent cvs commit of various e "TODO" stuff,
> > > Carsten writes:
> > > 
> > > > * bg needs a gradient dialog that can take a set of pre-drawn
> > > >   png's and edc recipies and use colored rects and overlayed
> > > >   png's recolored with color options to create vertical,
> > > >   horizontal, radial etc. gradients quickly and save to an edc
> > > 
> > > 	After reading this a couple of times, I had a beer and then
> > > read it again a couple of more times... I still have absolutely NO
> > > idea what the heck this means! :) :)
> > 
> > so you can define gradients for a bg - but store the saved config in a .edj
> > file. use an imag with a pre-rendered alpha->white gradient (horz, vert,
> > radial) then use a bg rect for one color and set the color of the gradient
> > image object to determine the 2nd color for the gradient - and then just
> > properties (scale, tile, which image, where and the 2 colors). a quick way
> > for users to get a gradient bg that they can share with friends, other
> > computers etc. just like images in .edj files. identical mechanism.
> > 
> 
> Wouldn't it more sense to add evas gradient support to edje?

sure - except 3 things
1. need to dd the code to edje
2. gradients are slower than image manipulation - especially in non-software
engines
3. you need a gui to select attributes for your gradient anyway so this need
still stands - it simply would implement it using manipulated images
recoloured in edje :)

were gradients supported in edje then 3. could use it as a saving mechanism -
but you still may hit performance issues with 2. remember gradients re one of
the least used and least optimised bits of evas - admittedly using them will
force them to be optimized but i'd hoped to put that off so we wouldn't need to
do it before e17 :) then again we do need to do a major overhaul of evas engine
internals - at lest colorspace and engine api... :(

> E.g. something like:
> 
>   collections {
>     group {
>       name: "grad_test";
>       parts {
>         part {
>           name: "grad";
>           type: GRADIENT;
>           description {
>             gradient {
>               angle: 90;
>               spread: 1;
>               color: 255 255 255 255 0; // r g b a distance
>               color: 0 0 0 0 1;
>             }
>           }
>         }
>       }
>     }
>   }
> 
> which would result in something like:
> 
> http://rephorm.com/files/dump/edje_grad.png
> 
> (actual screenshot)
> 
> I still have a bit more to add and test, but looks fairly straightforward.
> The only question would be how to transition between states on a GRADIENT
> part. Do we actually try to calculate a transition gradient? This would be
> straightforward if the control points were at the same distances. For others,
> it gets more complex (would need get the union of control point locations for
> both sides, and then interpolate from there). Shouldn't be unreasonable
> though.

well indeed - nice, grad objs. need to do more than linear tho... and then how
to specify all the params of other gradient types... anyway.

for tweening transitions. this is tough. if start and end gradients dont have
the same control points (number, position) what do you do? do you try and merge
control points? or do you do a merged overlay of all control points so the
intermediat grad is a superset of all control points (exact duplicates removed)
and then just linear interp the colors of these control points (and calculate
their rgba from their appropriate positions in the start and end grdients). i
would say that is what you want... :)

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)