forked from enlightenment/efl
Elementary map : a bug fix for zoom-out in elm_map by Kim Yunhan
I wrote a patch that handles a bug while zooming-out in elm_map. When I try to zoom out, some tiles are broken. But it is hard to notice because broken frame disappears quickly. I investigated in a few days. And I realize that there are something wrong. When map is zoomed out, a tile is shrunk by evas_object_resize(). But evas_map handles its texture by just its origin image size not a shrunk size. If evas_object's width & height is shrunk, I have to handle for its texture. SVN revision: 63509
This commit is contained in:
parent
45d161a5fa
commit
237c6e0961
|
@ -742,6 +742,17 @@ obj_rotate_zoom(void *data, Evas_Object *obj)
|
|||
}
|
||||
|
||||
evas_map_util_points_populate_from_object_full(wd->map, obj, 0);
|
||||
int ow, oh, iw, ih;
|
||||
evas_object_image_size_get(obj, &iw, &ih);
|
||||
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
|
||||
if (ow < iw || oh < ih)
|
||||
{
|
||||
ow *= (double)iw / ow;
|
||||
oh *= (double)ih / oh;
|
||||
evas_map_point_image_uv_set(wd->map, 1, ow, 0);
|
||||
evas_map_point_image_uv_set(wd->map, 2, ow, oh);
|
||||
evas_map_point_image_uv_set(wd->map, 3, 0, oh);
|
||||
}
|
||||
evas_map_util_zoom(wd->map, wd->pinch.level, wd->pinch.level, wd->pinch.cx, wd->pinch.cy);
|
||||
evas_map_util_rotate(wd->map, wd->rotate.d, wd->rotate.cx, wd->rotate.cy);
|
||||
evas_object_map_enable_set(obj, EINA_TRUE);
|
||||
|
@ -2290,7 +2301,7 @@ _pan_calculate(Evas_Object *obj)
|
|||
rect_place(sd->wd->obj, sd->wd->pan_x, sd->wd->pan_y, ox, oy, ow, oh);
|
||||
EINA_LIST_FOREACH(sd->wd->grids, l, g)
|
||||
{
|
||||
if ((sd->wd->pinch.level == 1.0) || (sd->wd->pinch.level == 0.5)) grid_load(sd->wd->obj, g);
|
||||
if (sd->wd->zoom == g->zoom) grid_load(sd->wd->obj, g);
|
||||
grid_place(sd->wd->obj, g, sd->wd->pan_x, sd->wd->pan_y, ox, oy, ow, oh);
|
||||
marker_place(sd->wd->obj, g, sd->wd->pan_x, sd->wd->pan_y, ox, oy, ow, oh);
|
||||
if (!sd->wd->zoom_animator) route_place(sd->wd->obj, g, sd->wd->pan_x, sd->wd->pan_y, ox, oy, ow, oh);
|
||||
|
|
Loading…
Reference in New Issue