From e40b97122eb2496a489c79d5427ce216a6992424 Mon Sep 17 00:00:00 2001 From: cedric Date: Fri, 5 Nov 2010 14:59:22 +0000 Subject: [PATCH] * evas: fix possible off by one bug with line object. Reported by Daniele. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@54182 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/engines/common/evas_line_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.7.4