On Thu, 29 Dec 2011 00:37:35 -0500 Youness Alaoui
<kakar...@kakaroto.homelinux.net> said:

> Hi,
> 
> I'm trying to develop a small GUI using edje, and I've run into a few
> problems already... it seems that the 'clip_to' keyword screws up some
> stuff.
> Unless I'm understanding this wrong, the clip_to only means "do not draw
> anything that's outside of this area".. but if you do a clip_to on a TEXT
> or IMAGE and the clipping is a rect, it seems to actually override the
> other part, and apply it as a mask.. I'm not sure I can explain this
> properly so here's a test :
> http://dl.dropbox.com/u/22642664/edje_clip_to_bug.edc
> http://dl.dropbox.com/u/22642664/gnome-run.png (needed file)
> 
> and here's a screenshot of the result (this is of course with latest SVN) :
> without clip_to :
> http://dl.dropbox.com/u/22642664/edje_clip_to_bug1.png
> as expected, we have a red background with the image on top
> 
> with clip_to :
> http://dl.dropbox.com/u/22642664/edje_clip_to_bug2.png
> The background is now black and the image seems to have been xor-ed with
> the red...

this is correct behavior. clips both clip to the rect region AND multiple by
color of the clipper. so if clip is red - everything becomes red. this is also
how you can fade out multiple objects - clip to a translucent rect. keep rect
white+solid if u dont want this (255 255 255 255). :)

> Another bug is apparently with the 'aspect' attribute of an IMAGE type
> part. If you set the aspect attribute, then the part will forget about its
> real size. More precisely, if I have an image in a group, and I create in
> another group a part of type GROUP and embed that group in it, then the
> image will overflow from its part.
> Hard to explain, so here's a sample code :
> http://dl.dropbox.com/u/22642664/edje_aspect_bug.edc
> 
> Here's the result of the test without aspect: 1.0 1.0;
> http://dl.dropbox.com/u/22642664/edje_aspect_bug1.png
> And here it is again when you enable the aspect keyword :
> http://dl.dropbox.com/u/22642664/edje_aspect_bug2.png
> 
> All I want basically is to have the image inside its group but with the
> proper aspect ratio. Note that adding 'to: "bg";' in the relative positions
> doesn't seem to change anything, once aspect keyword is there, it just
> seems to take its size/position relative to the full window. I haven't
> tried without this GROUP part, but it might be reproducable just by doing a
> relative "to" keyword.

it's behaving as it should. it's using horizontal aspect preference. i.e
horizontal dimensions control aspect. you can change this:

aspect_preference: BOTH;

that may be what you wanted? or you can try NONE, HORIZONTAL (end up being the
same), VERTICAL as well. :)

> Thanks for looking into this.
> 
> p.s: Anyone knows how to use lua to get a part's object? all I saw in the
> doc is edje.edje() to create a new edje object.. but what if I want to
> write a script to get an existing part (like a text part) and modify it in
> lua? or in embryo how to change a TEXT part's text...

for existing edje groups use embryo for script. lua is intended for script-only
objects. objects created entirely by lua code. resizing and layout is handled
by lua. everything is. it's meant to be a clear dividing line and also simplify
the lua script support code. script only objects also are sandboxed like the
rest of edje - they are not allowed access to any data outside the edje file
they come from. that is intentional for security.

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to