]> granicus.if.org Git - graphviz/commitdiff
Add -s flag (as in dot -s) to gvedit
authorEmden R. Gansner <erg@alum.mit.edu>
Thu, 14 Nov 2013 17:18:50 +0000 (12:18 -0500)
committerEmden R. Gansner <erg@alum.mit.edu>
Thu, 14 Nov 2013 17:18:50 +0000 (12:18 -0500)
cmd/gvedit/gvedit.1
cmd/gvedit/main.cpp

index 3d16ff10666163a3cc923c185481c173364d0399..5369aac0d9a0f3b6bb84ca1b8cd48cfc469d1c66 100644 (file)
@@ -4,6 +4,9 @@ gvedit \- simple graph editor and viewer
 .SH SYNOPSIS
 .B gvedit
 [
+.B \-sv?
+]
+[
 .I file
 ]
 .SH DESCRIPTION
@@ -13,6 +16,20 @@ same time. The text of each graph is displayed in its own text window.
 .P
 The name of a Graphviz file can be specified on the command line. This graph
 file will be automatically opened on start-up.
+.SH OPTIONS
+The following options are supported:
+.TP
+.B \-s
+By default, the layout algorithms that use initial positions given by a node's pos attribute
+(currently, fdp and neato) assume the coordinates are in inches. Frequently, the input graph
+has these in points, especially if the graph is output by a Graphviz layout algorithm. This flag
+can be used to scale the coordinates from points to inches.
+.TP
+.B \-v
+Verbose mode.
+.TP
+.B \-?
+Prints usage information and exit.
 .SH AUTHOR
 Arif Bilgin <arif@research.att.com>
 .br
index 13b68a386f64e5b18e587c7853bf5d267cd4fa3e..faa8095968c6bd54eb9e50a713cd1011e4a58aea 100644 (file)
@@ -48,8 +48,9 @@ static char *cmd;
 QTextStream errout(stderr, QIODevice::WriteOnly);
 
 static char *useString = "Usage: gvedit [-v?] <files>\n\
-  -v - verbose\n\
-  -? - print usage\n";
+  -s    - Scale input by 72\n\
+  -v    - verbose\n\
+  -?    - print usage\n";
 
 static void usage(int v)
 {
@@ -62,8 +63,11 @@ static char **parseArgs(int argc, char *argv[])
     int c;
 
     cmd = argv[0];
-    while ((c = getopt(argc, argv, ":v?")) != -1) {
+    while ((c = getopt(argc, argv, ":sv?")) != -1) {
        switch (c) {
+       case 's':
+           PSinputscale = POINTS_PER_INCH;
+           break;
        case 'v':
            Verbose = 1;
            break;