Преглед изворни кода

d.vect: node box sizeable (size=)
show dir also for faces


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56033 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa пре 12 година
родитељ
комит
8d7d8258e8
4 измењених фајлова са 11 додато и 5 уклоњено
  1. 4 1
      display/d.vect/dir.c
  2. 1 1
      display/d.vect/local_proto.h
  3. 1 1
      display/d.vect/main.c
  4. 5 2
      display/d.vect/topo.c

+ 4 - 1
display/d.vect/dir.c

@@ -32,7 +32,10 @@ int display_dir(struct Map_info *Map, int type, struct cat_list *Clist,
 	    return 0;
 	}
 
-	if (!(type & ltype & GV_LINES))
+        if (!(ltype & type))
+          continue;
+
+	if (!(ltype & (GV_LINES | GV_FACE)))
 	    continue;
 
 	if (chcat) {

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

@@ -57,7 +57,7 @@ int option_to_color(struct color_rgb *, const char *);
 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 *);

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

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

+ 5 - 2
display/d.vect/topo.c

@@ -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 @@ int display_topo(struct Map_info *Map, int type, LATTR *lattr)
 	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 @@ int display_topo(struct Map_info *Map, int type, LATTR *lattr)
 
 	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);