Hi,
I want to know is it possible to add image on camera preview without using EDC file ?
I have a edc file where i am currently flash_btn image on camera preview. But i want to add the flash_btn image to be drawn from the main-view.c file. How i can do this without using the edc file ?
images { image: IMAGE_PATH"bar.png" COMP; image: IMAGE_PATH"none.png" COMP; image: IMAGE_PATH"transparent.png" COMP; image: IMAGE_PATH"flash.png" COMP; } //images collections { base_scale: 1.8; group { name: "layout"; parts { /* part { name: "bottom_bar"; type: IMAGE; description { fixed: 1 1; rel1 { relative: 0.0 0.93; } rel2 { relative: 1.0 1.0; } visible: 1; image.normal: IMAGE_PATH"bar.png"; } } //part */ part { name: "elm.swallow.content"; type: SWALLOW; description { rel1 { relative: 0.0 0.0; } rel2 { relative: 1.0 1.0; } visible: 1; } } //part part { name: "transparent_object"; type: SWALLOW; description { rel1 { relative: 0.0 0.0; } rel2 { relative: 1.0 1.0; to: elm.swallow.content; } color: 255 255 255 0; } } //part part { name: "flash_btn"; type: IMAGE; description { fixed: 1 1; rel1 { relative: 0.62 0.59; to: transparent_object; } rel2 { relative: 0.78 0.62; to: transparent_object; } min: 40 40; max: 70 70; visible: 1; image.normal: IMAGE_PATH"flash.png"; } } //part
I already some code but i am not sure if it is the right proceedure. below is the code.
Evas_Object *img = elm_image_add(view->layout); elm_image_file_set(img, "edje/images/flash.png", NULL); evas_object_image_preload(img,EINA_TRUE); elm_object_part_content_set(view->layout, "flash_btn", img); evas_object_image_fill_set(img, 0,0, 40, 70); elm_object_signal_emit(view->layout, "elm.swallow.content", view->preview_canvas); evas_object_show(img);
Thanks again