info.bioinfweb.treegraph.cmd
Class ImageGenerator
java.lang.Object
info.bioinfweb.treegraph.cmd.ImageGenerator
public class ImageGenerator
- extends Object
Method Summary |
static boolean |
generate(info.webinsel.util.CommandLineReader reader)
|
private static float |
readDistance(String content,
GraphicWriterHints hints)
Reads a distance value (width or height) from the specified parameter in millimeters or pixels. |
private static float |
readRes(String content)
Reads the resolution from the specified parameter and converts it to pixels per millimeter if
necessary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLADOGRAM_OPTION
public static final String CLADOGRAM_OPTION
- See Also:
- Constant Field Values
PHYLOGRAM_OPTION
public static final String PHYLOGRAM_OPTION
- See Also:
- Constant Field Values
WIDTH_OPTION
public static final String WIDTH_OPTION
- See Also:
- Constant Field Values
HEIGHT_OPTION
public static final String HEIGHT_OPTION
- See Also:
- Constant Field Values
RESOLUTION_OPTION
public static final String RESOLUTION_OPTION
- See Also:
- Constant Field Values
UNIT_PPM
public static final String UNIT_PPM
- See Also:
- Constant Field Values
UNIT_PPI
public static final String UNIT_PPI
- See Also:
- Constant Field Values
UNIT_MM
public static final String UNIT_MM
- See Also:
- Constant Field Values
UNIT_PT
public static final String UNIT_PT
- See Also:
- Constant Field Values
UNIT_PX
public static final String UNIT_PX
- See Also:
- Constant Field Values
ImageGenerator
public ImageGenerator()
readRes
private static float readRes(String content)
- Reads the resolution from the specified parameter and converts it to pixels per millimeter if
necessary.
- Parameters:
content
- the string that contains value and unit
- Returns:
readDistance
private static float readDistance(String content,
GraphicWriterHints hints)
- Reads a distance value (width or height) from the specified parameter in millimeters or pixels.
Values in points are converted to millimeters. Additionally the
GraphicWriter.KEY_DIMENSIONS_IN_PIXELS
flag is added to the specified hints according to
the units specified by content
.
- Parameters:
content
- the string that contains value and unitpixelsPerMillimeter
- the resolution of the image to be createdhints
-
- Returns:
generate
public static boolean generate(info.webinsel.util.CommandLineReader reader)