Revision: 64358
          http://sourceforge.net/p/brlcad/code/64358
Author:   carlmoore
Date:     2015-03-10 19:41:43 +0000 (Tue, 10 Mar 2015)
Log Message:
-----------
various fixes to plot3-ps, including implementing h?

Modified Paths:
--------------
    brlcad/trunk/doc/docbook/system/man1/en/plot3-ps.xml
    brlcad/trunk/src/util/plot3-ps.c

Modified: brlcad/trunk/doc/docbook/system/man1/en/plot3-ps.xml
===================================================================
--- brlcad/trunk/doc/docbook/system/man1/en/plot3-ps.xml        2015-03-10 
19:03:17 UTC (rev 64357)
+++ brlcad/trunk/doc/docbook/system/man1/en/plot3-ps.xml        2015-03-10 
19:41:43 UTC (rev 64358)
@@ -18,10 +18,10 @@
 <cmdsynopsis>
   <command>plot3-ps</command>
     <arg choice='opt'>-ec </arg>
-    <arg choice='opt'>-s <replaceable>square_output_size</replaceable></arg>
-    <arg choice='opt'>-w <replaceable>output_width</replaceable></arg>
-    <arg choice='opt'>-n <replaceable>output_height</replaceable></arg>
-    <arg choice='plain'>&lt;</arg>
+    <arg choice='opt'>-s|S <replaceable>square_output_size</replaceable></arg>
+    <arg choice='opt'>-w|W <replaceable>output_width</replaceable></arg>
+    <arg choice='opt'>-n|N <replaceable>output_height</replaceable></arg>
+    <arg choice='opt'>&lt;</arg>
     <arg choice='plain'><replaceable>unix_plot</replaceable></arg>
 </cmdsynopsis>
 </refsynopsisdiv>
@@ -35,13 +35,21 @@
 documents.
 The
 <option>-e</option>
-option will produce and encapsulated PostScript file. The
+option will produce an encapsulated PostScript file. The
+<option>-c</option>
+option causes the output to be centered on an 8.5 x 11 inch page. The
 <option>-s</option>
 ,
 <option>-w</option>
 , and
 <option>-n</option>
-options specify the size of the output image in inches (ignored when used with 
the
+options (alternatively
+<option>-S</option>
+,
+<option>-W</option>
+, and
+<option>-N</option>)
+specify the size of the output image in inches (ignored when used with the
 <option>-e</option>
 option).</para>
 

Modified: brlcad/trunk/src/util/plot3-ps.c
===================================================================
--- brlcad/trunk/src/util/plot3-ps.c    2015-03-10 19:03:17 UTC (rev 64357)
+++ brlcad/trunk/src/util/plot3-ps.c    2015-03-10 19:41:43 UTC (rev 64358)
@@ -121,12 +121,12 @@
 
 #define DEFAULT_SIZE 6.75      /* default output size in inches */
 
-int encapsulated = 0;  /* encapsulated postscript */
+int encapsulated = 0;  /* encapsulated PostScript */
 int center = 0;                /* center output on 8.5 x 11 page */
 int width = 4096;              /* Our integer plotting space */
 int height = 4096;
-double outwidth;               /* output plot size in inches */
-double outheight;
+double outwidth = DEFAULT_SIZE;                /* output plot size in inches */
+double outheight = DEFAULT_SIZE;
 int xpoints;           /* output plot size in points */
 int ypoints;
 int page_dirty = 0;            /* to skip extra erases */
@@ -136,8 +136,8 @@
 static FILE *infp;
 
 static char usage[] = "\
-Usage: plot3-ps [-e] [-c] [-S inches_square]\n\
-       [-W width_inches] [-N height_inches] [file.plot3]\n";
+Usage: plot3-ps [-e] [-c] [-s|S inches_square]\n\
+       [-w|W width_inches] [-n|N height_inches] [<] file.plot3\n";
 
 int
 getshort(void)
@@ -363,7 +363,7 @@
 {
     int c;
 
-    while ((c = bu_getopt(argc, argv, "ecs:w:n:S:W:N:")) != -1) {
+    while ((c = bu_getopt(argc, argv, "ecs:w:n:S:W:N:h?")) != -1) {
        switch (c) {
            case 'e':
                /* Encapsulated PostScript */
@@ -386,7 +386,7 @@
                outheight = atof(bu_optarg);
                break;
 
-           default:            /* '?' */
+           default:            /* 'h' '?' */
                return 0;
        }
     }
@@ -420,8 +420,6 @@
     int c;
     struct uplot *up;
 
-    outwidth = outheight = DEFAULT_SIZE;
-
     if (!get_args(argc, argv)) {
        (void)fputs(usage, stderr);
        bu_exit (1, NULL);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to