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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 29 06:03:51 PDT 2013


Author: martinl
Date: 2013-04-29 06:03:50 -0700 (Mon, 29 Apr 2013)
New Revision: 56033

Modified:
   grass/trunk/display/d.vect/dir.c
   grass/trunk/display/d.vect/local_proto.h
   grass/trunk/display/d.vect/main.c
   grass/trunk/display/d.vect/topo.c
Log:
d.vect: node box sizeable (size=)
        show dir also for faces


Modified: grass/trunk/display/d.vect/dir.c
===================================================================
--- grass/trunk/display/d.vect/dir.c	2013-04-29 11:22:53 UTC (rev 56032)
+++ grass/trunk/display/d.vect/dir.c	2013-04-29 13:03:50 UTC (rev 56033)
@@ -32,7 +32,10 @@
 	    return 0;
 	}
 
-	if (!(type & ltype & GV_LINES))
+        if (!(ltype & type))
+          continue;
+
+	if (!(ltype & (GV_LINES | GV_FACE)))
 	    continue;
 
 	if (chcat) {

Modified: grass/trunk/display/d.vect/local_proto.h
===================================================================
--- grass/trunk/display/d.vect/local_proto.h	2013-04-29 11:22:53 UTC (rev 56032)
+++ grass/trunk/display/d.vect/local_proto.h	2013-04-29 13:03:50 UTC (rev 56033)
@@ -57,7 +57,7 @@
 void option_to_where(struct Map_info *, struct cat_list *, const char *);
 
 /* topo.c */
-int display_topo(struct Map_info *, int, LATTR *);
+int display_topo(struct Map_info *, int, LATTR *, double);
 
 /* zcoor.c */
 int display_zcoor(struct Map_info *, int, LATTR *);

Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c	2013-04-29 11:22:53 UTC (rev 56032)
+++ grass/trunk/display/d.vect/main.c	2013-04-29 13:03:50 UTC (rev 56033)
@@ -474,7 +474,7 @@
 	    stat += display_zcoor(&Map, type, &lattr);
 
 	if (display & DISP_TOPO)
-	    stat += display_topo(&Map, type, &lattr);
+            stat += display_topo(&Map, type, &lattr, size);
     }
 
     D_save_command(G_recreate_command());

Modified: grass/trunk/display/d.vect/topo.c
===================================================================
--- grass/trunk/display/d.vect/topo.c	2013-04-29 11:22:53 UTC (rev 56032)
+++ grass/trunk/display/d.vect/topo.c	2013-04-29 13:03:50 UTC (rev 56033)
@@ -5,9 +5,10 @@
 #include "local_proto.h"
 #include "plot.h"
 
-int display_topo(struct Map_info *Map, int type, LATTR *lattr)
+int display_topo(struct Map_info *Map, int type, LATTR *lattr, double dsize)
 {
     int ltype, num, el;
+    double msize;
     struct line_pnts *Points;
     struct line_cats *Cats;
     char text[50];
@@ -20,6 +21,8 @@
 	return 1;
     }
     
+    msize = dsize * (D_d_to_u_col(2.0) - D_d_to_u_col(1.0));	/* do it better */
+    
     lattr2.xref = lattr->xref == LRIGHT ? LLEFT : LRIGHT;
 
     G_debug(1, "display topo:");
@@ -72,7 +75,7 @@
 
 	show_label(&X, &Y, &lattr2, text);
 
-	D_plot_icon(X, Y, G_ICON_BOX, 0, 10);
+	D_plot_icon(X, Y, G_ICON_BOX, 0, msize);
     }
 
     Vect_destroy_line_struct(Points);



More information about the grass-commit mailing list