* evas: fix possible off by one bug with line object.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 5 Nov 2010 14:59:22 +0000 (14:59 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 5 Nov 2010 14:59:22 +0000 (14:59 +0000)
Reported by Daniele.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@54182 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_line_main.c

index 92548df..5cae324 100644 (file)
@@ -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)