From: cedric Date: Fri, 5 Nov 2010 14:59:22 +0000 (+0000) Subject: * evas: fix possible off by one bug with line object. X-Git-Tag: 2.0_alpha~240^2~1366 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea4974a694f8cc3b473a365257f9282c7a0291c2;p=framework%2Fuifw%2Fevas.git * evas: fix possible off by one bug with line object. Reported by Daniele. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@54182 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/engines/common/evas_line_main.c b/src/lib/engines/common/evas_line_main.c index 92548df..5cae324 100644 --- a/src/lib/engines/common/evas_line_main.c +++ b/src/lib/engines/common/evas_line_main.c @@ -580,7 +580,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x clw = dc->clip.w; clh = dc->clip.h; - data = dst->image.data; + data = evas_cache_image_pixels(&dst->cache_entry); dstw = dst->cache_entry.w; data += (dstw * cly) + clx; @@ -607,7 +607,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (!p1_in) { - if ((py < -1) && (dely < 0)) return; + if ((py <= -1) && (dely < 0)) return; if ((py > by) && (dely > 0)) return; } if ((px) < clw) @@ -642,7 +642,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (!p1_in) { - if ((px < -1) && (delx < 0)) return; + if ((px <= -1) && (delx < 0)) return; if ((px > rx) && (delx > 0)) return; } if ((py) < clh)