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

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



jose_ogp@juno.com wrote:
>>> 	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)
>>
> 
> 	Unfortunately, no. Your points are more than well taken
> though. The primary reasons for choosing this 'format' were:
> 
<snip>
> 	If anyone could help out here with a better, fast enough,
> format-spec-and-decoding-implementation, that would be great :)
> 	[ The implementation of this is done in the function
> "shaped_setup_geom" of the evas_gradient_shaped.c file ]

I would consider using \0 for a separator.. makes parsing a snap.. just
search for the nth 0-byte to get the nth field, and you get the string
without further processing of the base string..

only downside is you can't use the stock string functions on that piece
of data, so it would need to be treated like binary data.. but it might
be a worthwhile tradeoff..

-- 
Cheers,
Morten
:wq