Languages

Menu
Sites
Language
Is there a function like elm_object_part_text_set for Images available?

If you create an EDC-File with a text part like this:

         part { name: "txt_title";
            type: TEXT;
            mouse_events: 0;
            scale: 1;
            description { state: "default" 0.0;
               text { text: "MyText; font: "Tizen:style=regular"; size: 20; min: 1 1; align: 0.5 0; }
               color: 0 0 0 255;
               align: 0.5 0.5;
               rel1.relative: 0.00 0.5;
               rel2.relative: 1.00 0.5;
            }            
         } // part "txt_title";

 

It's quite easy to change the text during runtime in the program with the function elm_object_part_text_set(watchface_layout, "txt_title", "Change text");

But I didn't found a similar function to access images defined in the EDC-file.

 

           part { name: "image_example";
            type: IMAGE;
            scale: 1.0;
            description { state: "default" 0.0;
               visible: 1;
               max: 360 360;
               image.normal: "example.png";
               // aspect: 1 1;
               align: 0.5 0.5;
               rel1.relative: 0.00 0.00;
               rel2.relative: 1.00 1.00;
               map {
                  on: 1;
                  rotation {
                     x: 0.0;
                     y: 0.0;
                     z: 0.0;
                  }
               }
            }
         } // part "image_example";

 

So I want to modify the image. For example rotate the image change opacity. But how to get the handle to this image defined in the EDC file. I only found the way to get the handle when I create the image during runtime. Any help are welcome. Thanks.

Responses

1 Replies
Armaan-Ul- Islam

You may try Elementary Image API in your C/C++ code to achieve such functionality.

Link:

https://developer.tizen.org/development/api-references/native-application?redirect=https%3A//developer.tizen.org/dev-guide/3.0.0/org.tizen.native.mobile.apireference/group__Elm__Image.html&langredirect=1

 

Example, like using

void elm_image_orient_set ( Elm_Image * obj, Elm_Image_Orient orient )