[GRASS-SVN] r59549 - grass/trunk/lib/pngdriver
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 1 20:56:42 PDT 2014
Author: hamish
Date: 2014-04-01 20:56:42 -0700 (Tue, 01 Apr 2014)
New Revision: 59549
Modified:
grass/trunk/lib/pngdriver/Draw_line.c
Log:
enable vertical width for lines, still suffers from rendering issues (#1283)
Modified: grass/trunk/lib/pngdriver/Draw_line.c
===================================================================
--- grass/trunk/lib/pngdriver/Draw_line.c 2014-04-02 03:49:23 UTC (rev 59548)
+++ grass/trunk/lib/pngdriver/Draw_line.c 2014-04-02 03:56:42 UTC (rev 59549)
@@ -67,7 +67,7 @@
struct path path;
struct vertex vertices[5];
double k = png.linewidth / 2;
- int dx, dy;
+ double dx, dy;
if (png.linewidth <= 1) {
draw_line(x1, y1, x2, y2);
@@ -80,7 +80,9 @@
path.alloc = 5;
path.start = -1;
- /* FIXME: dx, dy used uninitialized here, lines have no vertical width */
+ /* FIXME: rendering issues (#1283) */
+ dx = fabs(x2 - x1);
+ dy = fabs(y2 - y1);
if (dy > dx) {
path_move(&path, x1 - k, y1);
More information about the grass-commit
mailing list