Parcourir la source

pngdriver: complete backport of https://trac.osgeo.org/grass/changeset/59549

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@61756 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler il y a 10 ans
Parent
commit
09e0cffa5f
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      lib/pngdriver/Draw_line.c

+ 4 - 0
lib/pngdriver/Draw_line.c

@@ -80,6 +80,10 @@ void png_draw_line(double x1, double y1, double x2, double y2)
     path.alloc = 5;
     path.start = -1;
 
+    /* FIXME: rendering issues (#1283) */
+    dx = fabs(x2 - x1);
+    dy = fabs(y2 - y1);
+
     if (dy > dx) {
 	path_move(&path, x1 - k, y1);
 	path_cont(&path, x1 + k, y1);