On Sat, Dec 13, 2008 at 9:04 AM, Vincent Pomageot <[email protected]> wrote: > Thanks for your answer Gustavo ! > I've tried the new evas_object_image_filled_add() and it works well I > think... for someone who want to fill the complete evas canvas with an image > and resize it when one or the other is resized. > What I wanted to do was to fill the part:swallow with my image in order to > have its top left corner at rel1 and the bottom right corner at rel2. > I think getting the part:swallow as an object and then querying its min size > didn't do what I expected but I've found a better way to do that : > edje_object_part_geometry_get() > So here is my code now : > > - const Evas_Object *swallow = NULL; > - swallow = edje_object_part_object_get(my_edje, "place_for_image"); > - edje_object_size_min_get(swallow, &w, &h); > - evas_object_image_fill_set(image, 0, 0, w, h); > + Evas_Coord x, y; > + edje_object_part_geometry_get(my_edje, "place_for_image", &x, &y ,&w, > &h); > + printf("x:%d, y:%d, w:%d, h:%d", x, y, w, h); > + evas_object_image_fill_set(image, 0, 0, w, h); > + edje_object_part_swallow(my_edje, "place_for_image", image); > > With that call I can even remove the min size of the swallow part in the edc > because it seams to be calculated.. > Don't know if the description of my problem is clearer now or if I really > understand what you proposed :p > But now it works so thank you Gustavo !
You don't need none of this, in pseudo code your code should be something like: Evas_Object *image = evas_object_image_filled_add(evas); evas_object_image_file_set(image, path, NULL); edje_object_part_swallow(my_edje, "place_for_image", image); that's it, no show, no resize, no nothing. This should work. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
