Explorar o código

d.vect: customize dir size

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49073 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=13) %!d(string=hai) anos
pai
achega
dcfcd3f9f6
Modificáronse 3 ficheiros con 5 adicións e 5 borrados
  1. 3 3
      display/d.vect/dir.c
  2. 1 1
      display/d.vect/local_proto.h
  3. 1 1
      display/d.vect/main.c

+ 3 - 3
display/d.vect/dir.c

@@ -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();

+ 1 - 1
display/d.vect/local_proto.h

@@ -18,7 +18,7 @@ int display_area(struct Map_info *, struct cat_list *, const struct Cell_head *,
 		 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);

+ 1 - 1
display/d.vect/main.c

@@ -447,7 +447,7 @@ int main(int argc, char **argv)
 	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