Jagged edge Image on rotating with Evas map

261 views Asked by At

I am making a watch application for Samsung Gear S2 with EFL Native application.

Problem was happened when I rotate hands of the watch.
Look at following image.

enter image description here
This is normal image I paste it to evas_object and it's not rotated yet.

After I rotate it, the edge of hands has changed to jagged shape like it. enter image description here

Resolution of gear s2 is 360px X 360px so I make every image is fit to this size.

And I rotate image with following code.

Evas_Map *m = NULL;

m = evas_map_new(4);

//evas_map_smooth_set(m, true);
evas_map_util_points_populate_from_object(m, obj);
evas_map_util_rotate(m, degree, cx, cy);
evas_object_map_set(obj, m);
evas_object_map_enable_set(obj, EINA_TRUE);
evas_map_free(m);

I was try fix it with evas_map_smooth_set() function.
EFL document is written to this setting makes image to "SMOOTH" and default setting is "true". but I worried tizen change it to "false".

But jagged shape is still showing Despite after I set true or false.

The Watchface that created by "Gear Watch Designer" has not jagged image on rotating there hands.
How I can rotate Image without jagged edge?

2

There are 2 answers

0
pius lee On BEST ANSWER

OK finally I found why jagged edge is appear on rotating.

In the emulator or my gear s2, default EFL rendering engine is not opengl backend.

So I can fix it with following codes.

elm_config_accel_preference_set("opengl");

Write this code before create window (elm_win_add) it will make anti-aliased image on rotating image.

0
jpeg On

Sorry for the very late answer, but I believe you can fix this issue in two ways:

  1. Call evas_object_anti_alias_set() on the evas object that is mapped.

  2. As you've mentionned in another answer, use GL acceleration but you may even want to enable MSAA on the backbuffer: elm_config_accel_preference_set("opengl:msaa");