Choosing an edje image based on size



I just finished my 1st University exam. It was so very easy. However, riding home on my motorbike, I realised I left out some table metadata. I forgot to add border=”1″ and cellpadding=”5″. 😦


So edje now has dynamic image sources thanks to cedric! What that means, is its now incredibly easy to use the right image for the right size. It was previously possible with some embryo scripting, but that adds extra hassles. This new method is super easy. Lets take a gander.

images {
   image: "something.png" COMP;
   image: "somethingelse.png" COMP;
   set { name: "MrOneEye";
      image {
        image: "small.png" COMP;
        size: 10 10 100 100;
      image {
         image: "medium.png" COMP;
         size: 101 101 200 200;
      image {
         image: "large.png" COMP;
         size: 201 201 300 300;

So as you can see, the image set is specified in the images {} section, which can basically be thrown anywhere in your edje code. Typically, its set at the start of the group {} section. Then when its needed, its called upon just like the regular images in the description {} section:

 image.normal: "MrOneEye";

There you have it. Simple, easy to use image source selection. I can straight away think this would be ideal for icons, but also emoticons, and basically all images that have some detail when using the scale module.

Heres a tar ball of a working example. You need python-efl installed to run it!

That’s that for now. Im going to try to get this happening in E17, but for now, I have to finish coding/making this pill reminder project of mine.


No Responses Yet to “Choosing an edje image based on size”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: