Here is my attempt to do this. Follow README for usage... It's not very realistic though... I'm not an artist. Feel free to make something better from this ! BTW, I know that light is not exactly under the pointer (depends on the relative position of pointer) but it's a nice not_wanted_first effect.
enjoy and thanks for your help ! Carsten Haitzler (The Rasterman) wrote: >On Thu, 19 May 2005 09:43:55 +0200 Lionel ORRY <[EMAIL PROTECTED]> >babbled: > > > >>Hi all, >> >>I was wondering about making a new kind of edje background : i'd like to >>create a uniform color everywhere (say black for now), and reveal only >>the part of an underlayered picture which is around the mouse position. >>Imagine the mouse working like a light which reveals the closest part of >>the background. >> >>So i was wondering about the best way to achieve this... I've found some >>dragable parts could be made with embryo scripts, but i don't know how >>it works. Any help much appreciated ! >> >>thanks a lot to everybody for the very good work. >> >> > >that's kind of hard. how do you want to expose it? you can use clip rect then >overlay it with a mask image to mask out pixels u dont want to see with black. >the the problem is getting this to follow the mouse. get_mouse() can get u the >mosue coords relative to the object. get_geometry() can get u the x, y, w and h >get the geometry of any part - u can put a part int he bg and stretch it over >everything and use that as as a place to gather events - mouse,move will be a >signal emitted on mouse moves - so when that signal happens have the script for >it get the mouse x,y - get the geometry of the base part - make sure the other >parts in the edje dont accept events, then now u can caluclate a relative value >(x / width, y / height) as a float - then set those as drag values for a >dragable that controls this clip and then overlay... > > > >>Lionel >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by Oracle Space Sweepstakes >>Want to be the first software developer in space? >>Enter now for the Oracle Space Sweepstakes! >>http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click >>_______________________________________________ >>enlightenment-devel mailing list >>[email protected] >>https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >> >> >> > > > >
ck_background.tar.gz
Description: GNU Zip compressed data
