[GRASS-SVN] r52349 - grass/branches/releasebranch_6_4/display/d.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jul 8 03:13:35 PDT 2012


Author: martinl
Date: 2012-07-08 03:13:35 -0700 (Sun, 08 Jul 2012)
New Revision: 52349

Modified:
   grass/branches/releasebranch_6_4/display/d.vect/dir.c
   grass/branches/releasebranch_6_4/display/d.vect/local_proto.h
   grass/branches/releasebranch_6_4/display/d.vect/main.c
Log:
d.vect: dir arrows sizeable (backport from trunk)


Modified: grass/branches/releasebranch_6_4/display/d.vect/dir.c
===================================================================
--- grass/branches/releasebranch_6_4/display/d.vect/dir.c	2012-07-08 10:10:47 UTC (rev 52348)
+++ grass/branches/releasebranch_6_4/display/d.vect/dir.c	2012-07-08 10:13:35 UTC (rev 52349)
@@ -8,15 +8,15 @@
 /* arrow heads will be drawn at 25,50,75% of the line length */
 #define PERC_OF_LINE 25
 
-int dir(struct Map_info *Map, int type, struct cat_list *Clist, int chcat)
+int dir(struct Map_info *Map, int type, struct cat_list *Clist,
+        int chcat, int dsize)
 {
-    int ltype, dsize;
+    int ltype;
     double len, x, y, angle, msize, dist;
     struct line_pnts *Points;
     struct line_cats *Cats;
 
     G_debug(1, "display direction:");
-    dsize = 5;
     msize = dsize * (D_d_to_u_col(2.0) - D_d_to_u_col(1.0));	/* do it better */
 
     Points = Vect_new_line_struct();

Modified: grass/branches/releasebranch_6_4/display/d.vect/local_proto.h
===================================================================
--- grass/branches/releasebranch_6_4/display/d.vect/local_proto.h	2012-07-08 10:10:47 UTC (rev 52348)
+++ grass/branches/releasebranch_6_4/display/d.vect/local_proto.h	2012-07-08 10:13:35 UTC (rev 52349)
@@ -8,7 +8,7 @@
 	  int, char *);
 int label(struct Map_info *, int, struct cat_list *, LATTR *, int);
 int topo(struct Map_info *, int, LATTR *);
-int dir(struct Map_info *, int, struct cat_list *, int);
+int dir(struct Map_info *, int, struct cat_list *, int, int);
 int darea(struct Map_info *, struct cat_list *, const struct color_rgb *,
 	  const struct color_rgb *, int, int, int, int, struct Cell_head *,
 	  char *, int, char *, double, int, char *);

Modified: grass/branches/releasebranch_6_4/display/d.vect/main.c
===================================================================
--- grass/branches/releasebranch_6_4/display/d.vect/main.c	2012-07-08 10:10:47 UTC (rev 52348)
+++ grass/branches/releasebranch_6_4/display/d.vect/main.c	2012-07-08 10:13:35 UTC (rev 52349)
@@ -646,7 +646,7 @@
 	if (has_color) {
 	    R_RGB_color(color.r, color.g, color.b);
 	    if (display & DISP_DIR)
-		stat = dir(&Map, type, Clist, chcat);
+                stat = dir(&Map, type, Clist, chcat, size);
 	}
 
 	/* reset line width: Do we need to get line width from display



More information about the grass-commit mailing list