* edje: Fix fixed point use in map.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 17 Feb 2010 13:21:50 +0000 (13:21 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 17 Feb 2010 13:21:50 +0000 (13:21 +0000)
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

src/lib/edje_calc.c

index 69061de..390a990 100644 (file)
@@ -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
                {