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

Re: [E-devel] edje gradient fill

	Brian writes:

> How does the current implementation of an evas gradient differ
> from "a rect obj textured by a lin grad"? The rel1/rel2 inside
> the gradient block i added are in the part's coordinates
> (or fixed relative "to" the part).
> > 	So, if you want some simple way to get what you're after
> > for lin grads within this general context, then maybe what you
> > have now would be the way..
> I'm definitely open to other options, I just haven't seen any
> yet that let you do something as simple as a horizontal gradient
> filling its bounds.

	Sorry to take so long to get back to you on this, I've been
busy most of the day.
	Anyway, let's leave the first part above to a bit later..

	Ok, what to do about the issues you've brought up.. It would
be nice if edje would allow one to specify rel points so as to allow
some of this.. But, wether it might or not, here's what I think may
be the best way to deal with this:

	Let's leave the angle as just an absolute value for now,
and instead of having rel axis for its origin, let's do what we
*really* want to do -- namely, it's clear that were going to need
more than one linear gradient type to be able to deal with all
'three' types of desirable behaviors..
	ie. let's have three linear gradient types -- "y-linear",
"x-linear", and "d-linear" gradients, which will behave as follows:

	The y-linear one will be the same as the current linear one,
ie. the grad's spectrum will grow from the fill origin down to the
bottom-left of the fill region, ie. vertically with increasing y.

	The x-linear one will have its spectrum grow from the fill
origin to the top-right of the fill region, ie. horizontally with
increasing x.

	The d-linear one will have its spectrum grow from the fill
origin to the bottom-right of the fill region, ie. diagonally with
increasing right handed normal to the diagonal.

	In each case the spectrum will reach one cycle at the stated
end points -- bottom-left, top-right, bottom-right.

	This will then give you the best of all three scenarios you
mentioned as desirable, and feels pretty logical to me.. In fact,
we could actually go ahead and just add this to evas itself...

	What do you think?