edje - fixe the uv mapping correctly in case of image swallowed case

SVN revision: 75241
This commit is contained in:
ChunEon Park 2012-08-14 08:04:06 +00:00
parent 91bdc844fc
commit b11b7c3ac4
2 changed files with 8 additions and 2 deletions

View File

@ -552,3 +552,7 @@
2012-08-09 Cedric Bail
* Improve speed of color_class lookup by using an Eina_Hash.
2012-08-14 Hermet
* Fix the uv mapping correctly in case of image swallowed.

View File

@ -2986,7 +2986,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
// create map and populate with part geometry
if (!map) map = evas_map_new(4);
evas_map_util_points_populate_from_object(map, ep->object);
if (ep->part->type == EDJE_PART_TYPE_IMAGE)
if (ep->part->type == EDJE_PART_TYPE_IMAGE ||
((ep->part->type == EDJE_PART_TYPE_SWALLOW) &&
(!strcmp(evas_object_type_get(mo), "image")))
)
{
int iw = 1, ih = 1;
@ -2996,7 +2999,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
evas_map_point_image_uv_set(map, 2, iw , ih );
evas_map_point_image_uv_set(map, 3, 0.0, ih );
}
evas_map_util_3d_rotate(map,
TO_DOUBLE(pf->map.rotation.x), TO_DOUBLE(pf->map.rotation.y), TO_DOUBLE(pf->map.rotation.z),
pf->map.center.x, pf->map.center.y, pf->map.center.z);