[Swift-commit] r4091 - usertools/plotter/src/plotter
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Feb 14 17:10:42 CST 2011
Author: wozniak
Date: 2011-02-14 17:10:42 -0600 (Mon, 14 Feb 2011)
New Revision: 4091
Modified:
usertools/plotter/src/plotter/Lines.java
Log:
Add support for bw, misc cleanups
Modified: usertools/plotter/src/plotter/Lines.java
===================================================================
--- usertools/plotter/src/plotter/Lines.java 2011-02-14 21:58:55 UTC (rev 4090)
+++ usertools/plotter/src/plotter/Lines.java 2011-02-14 23:10:42 UTC (rev 4091)
@@ -1,16 +1,14 @@
package plotter;
+import gnu.getopt.Getopt;
+
import java.awt.Color;
import java.awt.geom.Rectangle2D;
-
import java.io.*;
import java.util.*;
-import gnu.getopt.Getopt;
-
import org.apache.commons.io.IOUtils;
import org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D;
-
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.NumberAxis;
@@ -30,8 +28,8 @@
public static boolean bw = false;
- static int w = 400;
- static int h = 400;
+ static int width = 400;
+ static int height = 400;
// null indicates the value was not set by the user
static Double xmin = null;
@@ -64,11 +62,11 @@
g2d.setGraphicContext
(new org.apache.xmlgraphics.java2d.GraphicContext());
- rectangle = new Rectangle2D.Double(0, 0, w, h);
+ rectangle = new Rectangle2D.Double(0, 0, width, height);
g2d.setGraphicContext
(new org.apache.xmlgraphics.java2d.GraphicContext());
- g2d.setupDocument(out, w, h);
+ g2d.setupDocument(out, width, height);
}
catch (IOException e)
{
@@ -170,8 +168,8 @@
{
switch (c)
{
- case 'v':
- verbose = true;
+ case 'v':
+ verbose = true;
}
}
@@ -268,16 +266,17 @@
width (output image width)
height (output image height)
xmin, xmax, ymin, ymax (auto-selected if not given)
+ bw (Black and white, true/false, default false)
*/
static void scanProperties()
{
String tmp;
tmp = properties.getProperty("width");
if (tmp != null)
- w = Integer.parseInt(tmp.trim());
+ width = Integer.parseInt(tmp.trim());
tmp = properties.getProperty("height");
if (tmp != null)
- h = Integer.parseInt(tmp.trim());
+ height = Integer.parseInt(tmp.trim());
tmp = properties.getProperty("xmin");
if (tmp != null)
xmin = Double.parseDouble(tmp);
@@ -290,6 +289,9 @@
tmp = properties.getProperty("ymax");
if (tmp != null)
ymax = Double.parseDouble(tmp);
+ tmp = properties.getProperty("bw");
+ if (tmp != null)
+ bw = Boolean.parseBoolean(tmp);
}
/**
More information about the Swift-commit
mailing list