I wrote:

>    Toma wrote:
>   
>> While everyones talking about gradients, Ive a request... Id like to
>> be able to create a gradient that goes from sollid white to alpha then
>> clip an image to it so that the image fades away. Something like
>> this...
>>
>> spectra {
>>   spectrum {
>>     name: "sp2";
>>     color: 255 255 255 255 1;
>>     color: 0 0 0 0 1;
>>   }
>> }
>> collections {
>> group {
>>    name: "Test";
>>    parts {
>>       part {
>>       name:          "base";
>>       type:          GRADIENT;
>>       mouse_events:  0;
>>       description {
>>          state:    "default" 0.0;
>>          gradient.spectrum: "sp2";
>>          fill.spread: 1;
>>       }
>>       }
>>       part {
>>       name:          "chinaman";
>>       mouse_events:  0;
>>       type:          IMAGE;
>>       clip_to:       "base";
>>       description {
>>          state:    "default" 0.0;
>>          image.image: ChinaManBeard.jpg" COMP;
>>          image.normal: "ChinaManBeard.jpg";
>>       }
>>       }
>>    }
>>  }
>> }
>>
>> In this example I was trying to get this image to fade like the
>> gradient does. If you clip the image to a normal RECT then fade the
>> clip box it will fade the image too.
>> Would be nice, but not essential. Im guessing the mechanics behind it
>> are alot more complex than I comprehend...
>> Toma
>>
>>   
>>     
>
>       This is something very useful and indeed I would like to add this
> ability to evas. I would add this as the ability to "mask" any object by
> either an image or gradient object.
>       I *don't* want to add it via the current clipping mechanism. Why?
> Because I implemented just that sometime back and ran into several semantic
> and practical 'issues' that I truly don't like. I'd leave clipping as is -
> clip to rectangles and ignore any transforms, corners, whatnot these objs
> might have.. ie. a pure rectangular display region clipping mechanism.
>
>       The separate "mask" approach allows for a simpler, easier to optimize,
> directly supported by most engines, and gives a powerful method since the
> mask objects (images or gradients) can be transformed and/or filtered.
> With it, you can get all the nifty 'new' reflection stuff that apple's
> made famous recently, and a lot more such masking effects (eg. mask with
> a buffer evas, indirectly, by masking with the associated image).
>
>       NB: This is somewhat similar to (though not exactly the same as)
> fill and/or stroke "texturing" of vgfx objs with image or grad objects.
>   

      BTW, as a related aside to all this, such 'masks' could also be used
for fading text (as some want to do), but if text objs are also supportive
of 'fill texturing' then it could be done that way as well. In fact, together
you have a very nice combo since you could use these to get faded reflections
of textured text (ie. fill-texture the text with some nifty image pattern say
and transform+mask it to get a faded reflection of such).

      While I'm at it with fill and/or stroke texturing here, one may note
that, often, such texturing of vgfx objs (ie. fill and/or stroking a path with
some image or gradient) can be somewhat boring. Ideally one should be able
to use more complex texturing methods (not just drawing more objs).
      *Some* apis/specs allow for "paint servers", which are just a way of
saying they let you supply the mechanism for such texturing yourself, usually
via modules or such. But it's a shame that they don't directly support something
like "multi-texturing", even if it's just with image or gradients -- ie. allow
for specifying a sequence of images and/or gradients (plus compositing ops) for
texturing with. This gives much nicer, more interesting results for drawing
vgfx objs. Of course one could attempt to do this indirectly by using an image
buffer to accumulate things, and then use that image as the actual texture..
but it's not quite as straightforward.
      On the other hand, this would fall under the category of a 'gfx pipeline'
(say by allowing 'fill texturing a texture obj' in evas), which I've argued
against for real-time use... so I take it all back. :)


____________________________________________________________
Sweepstakes!!! 
Enter for your chance to WIN  a summer spa getaway!
http://thirdpartyoffers.juno.com/TGL2141/fc/JKFkuJi7UjkhYuOKEA6GeSe8OGMdpJkhYuOiyZpxufEZV7HtEXfeOk/

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to