summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_map_image_core.c
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-11-25 21:35:33 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-11-25 21:35:33 +0900
commitcc115ec7869fcb706d2280a0a68fc3f0acb8a246 (patch)
tree3c7d867eee521a0f92b71102fd5a193cd2e3611d /src/lib/evas/common/evas_map_image_core.c
parentb395d7dbd47abadc0ac28e9ff5d5dc1827f66ac6 (diff)
evas/map: code refactoring.
use array for easier indexing in the coming anti-alias logic code.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/evas_map_image_core.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/evas/common/evas_map_image_core.c b/src/lib/evas/common/evas_map_image_core.c
index c81ccbb1b9..e5f3380322 100644
--- a/src/lib/evas/common/evas_map_image_core.c
+++ b/src/lib/evas/common/evas_map_image_core.c
@@ -26,11 +26,11 @@
26 span = &(line->span[i]); 26 span = &(line->span[i]);
27 27
28 //The polygon shape won't be completed type 28 //The polygon shape won't be completed type
29 if (span->x1 < 0) break; 29 if (span->x[0] < 0) break;
30 30
31 x = span->x1; 31 x = span->x[0];
32 32
33 w = (span->x2 - x); 33 w = (span->x[1] - x);
34 if (w <= 0) continue; 34 if (w <= 0) continue;
35 35
36 dv = (span->o2 - span->o1); 36 dv = (span->o2 - span->o1);
@@ -47,7 +47,7 @@
47 else if (u2 > swp) u2 = swp; 47 else if (u2 > swp) u2 = swp;
48 ud = (u2 - u) / w; 48 ud = (u2 - u) / w;
49 ud = ((long long)ud * (w << FP)) / dv; 49 ud = ((long long)ud * (w << FP)) / dv;
50 u -= (ud * (span->o1 - (span->x1 << FP))) / FP1; 50 u -= (ud * (span->o1 - (span->x[0] << FP))) / FP1;
51 if (ud < 0) u += ud; 51 if (ud < 0) u += ud;
52 if (u < 0) u = 0; 52 if (u < 0) u = 0;
53 else if (u >= swp) u = swp - 1; 53 else if (u >= swp) u = swp - 1;
@@ -61,7 +61,7 @@
61 else if (v2 > shp) v2 = shp; 61 else if (v2 > shp) v2 = shp;
62 vd = (v2 - v) / w; 62 vd = (v2 - v) / w;
63 vd = ((long long)vd * (w << FP)) / dv; 63 vd = ((long long)vd * (w << FP)) / dv;
64 v -= (vd * (span->o1 - (span->x1 << FP))) / FP1; 64 v -= (vd * (span->o1 - (span->x[0] << FP))) / FP1;
65 if (vd < 0) v += vd; 65 if (vd < 0) v += vd;
66 if (v < 0) v = 0; 66 if (v < 0) v = 0;
67 else if (v >= shp) v = shp - 1; 67 else if (v >= shp) v = shp - 1;
@@ -141,11 +141,11 @@
141 span = &(line->span[i]); 141 span = &(line->span[i]);
142 142
143 //The polygon shape won't be completed type 143 //The polygon shape won't be completed type
144 if (span->x1 < 0) break; 144 if (span->x[0] < 0) break;
145 145
146 x = span->x1; 146 x = span->x[0];
147 147
148 w = (span->x2 - x); 148 w = (span->x[1] - x);
149 if (w <= 0) continue; 149 if (w <= 0) continue;
150 150
151 ww = w; 151 ww = w;