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

Re: [E-devel] Evas 'shaped' gradient type



On Mon, Aug 07, 2006 at 08:15:30AM +0000, jose_ogp@juno.com wrote:
> Attached is a tgz file containing a patch for a new evas
> gradient type named "shaped".
> 
> 	This type, unlike the others, does not use a described
> geometry, but instead uses an image to specify that.
> 	The type has as its params a string of the form:
> 
> 	"file:key:mode"
> 
> Each of file, key, and mode must be present.
> 
>    'file' is the name of some image file.
>    'key' is the name of some key for loading from eet files --
> if no key is desired, then one must write NULL as the key.
>    'mode' is one of: alpha, grey, or color.
> The mode will determine how the spectrum is used in conjunction
> with the image to obtain the result:
> 	'alpha' uses the image's alpha channel as the index to
> the spectrum.
> 	'grey' uses the image's grey channel, ie. the values
> a*(r+g+b)/3, as the index.
> 	'color' uses all the image's color channels by using the
> spectrum as a color-modifier.
> 
> 	eg.  "/path_to/image.png:NULL:color"

Is there a reason you chose "NULL" instead of just leaving the field 
blank? (filename.ext::mode) 
Also, ':' is a valid character for a filename, so hopefully there's a
way to escape it?  ("/path/to/foo\:bar.png:NULL:color)
> 
> 	The evas_test_main program contains a sample of how to
> use this grad type... It can be used to obtain scaling/tiling/
> rotating/re-coloring of images...
> 

I'll try to play with this later this week. Time to throw together an
old Nintendo style game with rotating color palette animations? :)

rephorm