public final class DotExecutableUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String[] |
executeDot(File dotExecutablePath,
boolean invertYAxis,
File dotInputFile,
File outputFile,
String outputFormat)
Calls the Graphviz 'dot' executable with the given arguments.
|
static String[] |
getSupportedExportFormats(String dotExecutable) |
static File |
renderImage(File dotExecutablePath,
File dotInputFile,
String format,
File outputFile,
String[] outputs) |
public static File renderImage(File dotExecutablePath, File dotInputFile, String format, File outputFile, String[] outputs)
dotExecutablePath
- The path of the local Graphviz 'dot' executable, e.g.
"C:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe"dotInputFile
- The DOT content to renderformat
- The image format to export the graph to (e.g. 'pdf' or 'png')outputFile
- The output file or null
if the input file name
and location should be used (where only the file extension is
changed dependent on the format)outputs
- A String array with two Strings, where the first contains the
output of the input stream and the second contains the output
of the error stream.public static String[] executeDot(File dotExecutablePath, boolean invertYAxis, File dotInputFile, File outputFile, String outputFormat)
dotExecutablePath
- The path of the local Graphviz 'dot' executable, e.g.
"C:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe"invertYAxis
- Whether to invert the y-axis or not.dotInputFile
- The input file to pass to 'dot'.outputFile
- The output file to pass to 'dot' via the -o option. May be
null
.outputFormat
- The output format to pass to 'dot' via the -T option. May be
null
.Copyright (c) 2014 itemis AG and others. All rights reserved.