forked from enlightenment/efl
evas examples: Fix invalid assumption about proxy
In the map examples, the map image UV size was based on the image source geometry, rather than the image geometry itself. In the example, this affects how the glass is mirrored. Before this patch, the reflection is a single line stretched. EFL 1.18 and 1.19 seem to have the same issue, while 1.17 simply fails to show any reflection. 1.16 fails miserably and the entire window is black. If the original code was correct, then I believe that map and/or proxy rendering have been modified in a way that affects the meaning of those image UV parameters. But this seems like the regression (if it is one) is in fact quite old. @fix
This commit is contained in:
parent
a8ba44b708
commit
70821182ff
|
@ -142,8 +142,8 @@ _anim_cb(void *data)
|
||||||
efl_gfx_map_enable_set(o, EINA_TRUE);
|
efl_gfx_map_enable_set(o, EINA_TRUE);
|
||||||
|
|
||||||
o = evas_object_name_find(ad->canvas, "obj4");
|
o = evas_object_name_find(ad->canvas, "obj4");
|
||||||
evas_object_geometry_get(o, &x, &y, &w, &h);
|
efl_gfx_geometry_get(o, &x, &y, &w, &h);
|
||||||
evas_object_image_size_get(evas_object_image_source_get(o), &img_w, &img_h);
|
efl_gfx_view_size_get(o, &img_w, &img_h);
|
||||||
|
|
||||||
efl_gfx_map_dup(o, ref);
|
efl_gfx_map_dup(o, ref);
|
||||||
efl_gfx_map_point_coord_set(o, 0, x, y + h, 0);
|
efl_gfx_map_point_coord_set(o, 0, x, y + h, 0);
|
||||||
|
|
|
@ -141,7 +141,7 @@ _anim_cb(void *data)
|
||||||
|
|
||||||
o = evas_object_name_find(ad->canvas, "obj4");
|
o = evas_object_name_find(ad->canvas, "obj4");
|
||||||
evas_object_geometry_get(o, &x, &y, &w, &h);
|
evas_object_geometry_get(o, &x, &y, &w, &h);
|
||||||
evas_object_image_size_get(evas_object_image_source_get(o), &img_w, &img_h);
|
evas_object_image_size_get(o, &img_w, &img_h);
|
||||||
|
|
||||||
m = evas_map_new(4);
|
m = evas_map_new(4);
|
||||||
evas_map_point_coord_set(m, 0, x, y + h, 0);
|
evas_map_point_coord_set(m, 0, x, y + h, 0);
|
||||||
|
|
Loading…
Reference in New Issue