evas/map: correct last 1 pixel handling in spans.

Clipper causes the different rendering result by last 1 pixel on the width.
Because the left edge x range (0 ~ (w - 1)) and right edge x range (0  ~ w) is different.
This fix won't be memory over access problem even if x span position is on the end of the edge.
Because the span width(x2 - x1) will be 0, and it restuls in skipping drawing.
It's hardly find the problem but you can detect the subtle rendering difference when some arbitrary meshes with map is
You can compare image and rectangle map drawing for this.

@fix
This commit is contained in:
ChunEon Park 2014-11-26 17:39:27 +09:00
parent e9a40835f2
commit b7d5700312
1 changed files with 3 additions and 3 deletions

View File

@ -285,7 +285,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
spans[yp].span[i].col[1] = col[order[1]];
//Outside of the clipper
if ((spans[yp].span[i].x[0] >= (cx + cw)) ||
if ((spans[yp].span[i].x[0] > (cx + cw)) ||
(spans[yp].span[i].x[1] < cx))
spans[yp].span[i].x[0] = -1;
else
@ -310,7 +310,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
spans[yp].span[i].col[1] = col[order[1]];
//Outside of the clipper
if ((spans[yp].span[i].x[0] >= (cx + cw)) ||
if ((spans[yp].span[i].x[0] > (cx + cw)) ||
(spans[yp].span[i].x[1] < cx))
spans[yp].span[i].x[0] = -1;
else
@ -331,7 +331,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
spans[yp].span[i].col[1] = col[order[3]];
//Outside of the clipper
if ((spans[yp].span[i].x[0] >= (cx + cw)) ||
if ((spans[yp].span[i].x[0] > (cx + cw)) ||
(spans[yp].span[i].x[1] < cx))
spans[yp].span[i].x[0] = -1;
else