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

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



On Mon, 7 Aug 2006 08:15:30 GMT "jose_ogp@juno.com" <jose_ogp@juno.com> babbled:

> 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.

personally i would have made this 2 function parameters - fielname, key and
then an enum for mode. then its split at the api level and no parsing need be
done :)

>    '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"
> 
> 	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...
> 
> 
>    jose.
> 


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