From 4a6563f016c9d88129eddc037c1d55df4bc17c44 Mon Sep 17 00:00:00 2001 From: raster Date: Sun, 16 Jan 2011 08:03:28 +0000 Subject: [PATCH] and reduce error more by making coords fp/double. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@56181 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_image.c | 6 +++--- src/lib/canvas/evas_render.c | 8 +++----- src/lib/include/evas_private.h | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/lib/canvas/evas_object_image.c b/src/lib/canvas/evas_object_image.c index 188ac5d..1d93bda 100644 --- a/src/lib/canvas/evas_object_image.c +++ b/src/lib/canvas/evas_object_image.c @@ -2469,9 +2469,9 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su // draw geom +x +y for (; p < p_end; p++, pt++) { - pt->x = (p->x + x) << FP; - pt->y = (p->y + y) << FP; - pt->z = (p->z) << FP; + pt->x = ((int)p->x + x) << FP; + pt->y = ((int)p->y + y) << FP; + pt->z = ((int)p->z) << FP; // pt->x3 = p->px << FP; // pt->y3 = p->py << FP; pt->fx = p->px; diff --git a/src/lib/canvas/evas_render.c b/src/lib/canvas/evas_render.c index 13affd9..04f7d8c 100644 --- a/src/lib/canvas/evas_render.c +++ b/src/lib/canvas/evas_render.c @@ -678,11 +678,9 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, pt = pts; for (; p < p_end; p++, pt++) { - pt->x = (p->x + off_x) << FP; - pt->y = (p->y + off_y) << FP; - pt->z = (p->z) << FP; -// pt->x3 = p->px << FP; -// pt->y3 = p->py << FP; + pt->x = (p->x + (double)off_x) * FP1; + pt->y = (p->y + (double)off_y) * FP1; + pt->z = (p->z) * FP1; pt->fx = p->px; pt->fy = p->py; pt->fz = p->z; diff --git a/src/lib/include/evas_private.h b/src/lib/include/evas_private.h index eabe705..bff57f0 100644 --- a/src/lib/include/evas_private.h +++ b/src/lib/include/evas_private.h @@ -358,8 +358,7 @@ struct _Evas_Size_Hints struct _Evas_Map_Point { - Evas_Coord x, y, z, px, py; - double fx, fy, fz, fpx, fpy; + double x, y, z, px, py; double u, v; unsigned char r, g, b, a; }; -- 2.7.4