[GRASS-SVN] r49073 - grass/trunk/display/d.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 3 08:37:25 EDT 2011


Author: martinl
Date: 2011-11-03 05:37:25 -0700 (Thu, 03 Nov 2011)
New Revision: 49073

Modified:
   grass/trunk/display/d.vect/dir.c
   grass/trunk/display/d.vect/local_proto.h
   grass/trunk/display/d.vect/main.c
Log:
d.vect: customize dir size


Modified: grass/trunk/display/d.vect/dir.c
===================================================================
--- grass/trunk/display/d.vect/dir.c	2011-11-03 12:06:00 UTC (rev 49072)
+++ grass/trunk/display/d.vect/dir.c	2011-11-03 12:37:25 UTC (rev 49073)
@@ -4,15 +4,15 @@
 #include <grass/glocale.h>
 #include "plot.h"
 
-int display_dir(struct Map_info *Map, int type, struct cat_list *Clist, int chcat)
+int display_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;
     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/trunk/display/d.vect/local_proto.h
===================================================================
--- grass/trunk/display/d.vect/local_proto.h	2011-11-03 12:06:00 UTC (rev 49072)
+++ grass/trunk/display/d.vect/local_proto.h	2011-11-03 12:37:25 UTC (rev 49073)
@@ -18,7 +18,7 @@
 		 dbCatValArray *, struct Colors *, dbCatValArray *, int);
 
 /* dir.c */
-int display_dir(struct Map_info *, int, struct cat_list *, int);
+int display_dir(struct Map_info *, int, struct cat_list *, int, int);
 
 /* labels.c */
 int display_label(struct Map_info *, int, struct cat_list *, LATTR *, int);

Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c	2011-11-03 12:06:00 UTC (rev 49072)
+++ grass/trunk/display/d.vect/main.c	2011-11-03 12:37:25 UTC (rev 49073)
@@ -447,7 +447,7 @@
 	if (has_color) {
 	    D_RGB_color(color.r, color.g, color.b);
 	    if (display & DISP_DIR)
-		stat += display_dir(&Map, type, Clist, chcat);
+		stat += display_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