From: cedric Date: Wed, 17 Feb 2010 13:21:50 +0000 (+0000) Subject: * edje: Fix fixed point use in map. X-Git-Tag: submit/trunk/20120815.180907~1265 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d82420cd489ea65b94650d03cb914cd884277752;p=profile%2Fivi%2Fedje.git * edje: Fix fixed point use in map. Note: ep->description_pos is a FLOAT_T. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@46245 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_calc.c b/src/lib/edje_calc.c index 69061de..390a990 100644 --- a/src/lib/edje_calc.c +++ b/src/lib/edje_calc.c @@ -2026,18 +2026,18 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags) map = evas_map_new(4); evas_map_util_points_populate_from_geometry (map, ed->x + pf->x, ed->y + pf->y, pf->w, pf->h, 0); - + cx = ed->x + pf->x + (pf->w / 2); cy = ed->y + pf->y + (pf->h / 2); if ((chosen_desc->map.rot.id_center >= 0) && (chosen_desc->map.rot.id_center != ep->part->id)) { Edje_Real_Part *ep2 = - ed->table_parts[chosen_desc->map.rot.id_center % + ed->table_parts[chosen_desc->map.rot.id_center % ed->table_parts_size]; if (ep2) { - if (!ep2->calculated) + if (!ep2->calculated) _edje_part_recalc(ed, ep2, flags); cx = ed->x + ep2->x + (ep2->w / 2); cy = ed->y + ep2->y + (ep2->h / 2); @@ -2045,18 +2045,18 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags) } if ((ep->param2) && (ep->description_pos != ZERO)) { - rx = TO_DOUBLE(ep->param1.description->map.rot.x + - SCALE(ep->description_pos, - SUB(ep->param2->description->map.rot.x, - ep->param1.description->map.rot.x))); - ry = TO_DOUBLE(ep->param1.description->map.rot.y + - SCALE(ep->description_pos, - SUB(ep->param2->description->map.rot.y, - ep->param1.description->map.rot.y))); - rz = TO_DOUBLE(ep->param1.description->map.rot.z + - SCALE(ep->description_pos, - SUB(ep->param2->description->map.rot.z, - ep->param1.description->map.rot.z))); + rx = TO_DOUBLE(ADD(ep->param1.description->map.rot.x, + MUL(ep->description_pos, + SUB(ep->param2->description->map.rot.x, + ep->param1.description->map.rot.x)))); + ry = TO_DOUBLE(ADD(ep->param1.description->map.rot.y, + MUL(ep->description_pos, + SUB(ep->param2->description->map.rot.y, + ep->param1.description->map.rot.y)))); + rz = TO_DOUBLE(ADD(ep->param1.description->map.rot.z, + MUL(ep->description_pos, + SUB(ep->param2->description->map.rot.z, + ep->param1.description->map.rot.z)))); } else {