本文整理了Java中guru.nidi.graphviz.engine.Graphviz.render()
方法的一些代码示例,展示了Graphviz.render()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graphviz.render()
方法的具体详情如下:
包路径:guru.nidi.graphviz.engine.Graphviz
类名称:Graphviz
方法名:render
暂无
代码示例来源:origin: schemacrawler/SchemaCrawler
Graphviz.fromString(dotSource).render(format).toFile(outputFile.toFile());
代码示例来源:origin: apache/oozie
@Override
public String call() throws Exception {
final Graphviz graphviz = newGraphviz();
return graphviz.render(Format.SVG).toString();
}
}
代码示例来源:origin: apache/oozie
@Override
public BufferedImage call() throws Exception {
final Graphviz graphviz = newGraphviz();
return graphviz.render(Format.PNG).toImage();
}
}
代码示例来源:origin: org.apache.oozie/oozie-core
@Override
public String call() throws Exception {
final Graphviz graphviz = newGraphviz();
return graphviz.render(Format.SVG).toString();
}
}
代码示例来源:origin: org.apache.oozie/oozie-core
@Override
public BufferedImage call() throws Exception {
final Graphviz graphviz = newGraphviz();
return graphviz.render(Format.PNG).toImage();
}
}
代码示例来源:origin: gradle.plugin.com.simonharrer/gradle-graphviz-plugin
projectPath.relativize(targetPngPath).toString());
System.out.println(message);
Graphviz.fromFile(path.toFile()).render(Format.PNG).toFile(targetPngPath.toFile());
} catch (IOException e) {
throw new RuntimeException(e);
代码示例来源:origin: CESNET/perun
@Override
public void write(Object object) throws IllegalArgumentException, IOException, RpcException {
if (object instanceof Graphviz) {
((Graphviz) object).render(Format.SVG).toOutputStream(outputStream);
} else {
writePerunException(new InternalErrorException("Received object was not Graphviz object."));
}
}
代码示例来源:origin: org.apache.oozie/oozie-fluent-job-api
public static void graphToPng(final Graph graph, final String fileName) throws IOException {
final MutableGraph mg = Parser.read(graphToDot(graph));
mg.setName(fileName);
Graphviz.fromGraph(mg)
.width(PNG_WIDTH)
.render(Format.PNG)
.toFile(new File(PARENT_FOLDER_NAME, FilenameUtils.getName(fileName)));
}
代码示例来源:origin: apache/oozie
public static void graphToPng(final Graph graph, final String fileName) throws IOException {
if (!isProperJDKVersion()) {
System.err.println("JDK version is not correct, omitting generating PNG from graph.");
return;
}
final MutableGraph mg = Parser.read(graphToDot(graph));
mg.setName(fileName);
try {
Graphviz.fromGraph(mg)
.width(PNG_WIDTH)
.render(Format.PNG)
.toFile(new File(PARENT_FOLDER_NAME, FilenameUtils.getName(fileName)));
}
catch (final GraphvizException e) {
throw new GraphvizException(String.format("Java version is %s", System.getProperty("java.version")), e);
}
}
代码示例来源:origin: apache/oozie
public static void workflowToPng(final Workflow workflow, final String fileName) throws IOException {
if (!isProperJDKVersion()) {
System.err.println("JDK version is not correct, omitting generating PNG from workflow.");
return;
}
final MutableGraph mg = Parser.read(workflowToDot(workflow));
mg.setName(fileName);
try {
Graphviz.fromGraph(mg)
.width(PNG_WIDTH)
.render(Format.PNG)
.toFile(new File(PARENT_FOLDER_NAME, FilenameUtils.getName(fileName)));
}
catch (final GraphvizException e) {
throw new GraphvizException(String.format("Java version is %s", System.getProperty("java.version")), e);
}
}
代码示例来源:origin: org.apache.oozie/oozie-fluent-job-api
public static void workflowToPng(final Workflow workflow, final String fileName) throws IOException {
final MutableGraph mg = Parser.read(workflowToDot(workflow));
mg.setName(fileName);
Graphviz.fromGraph(mg)
.width(PNG_WIDTH)
.render(Format.PNG)
.toFile(new File(PARENT_FOLDER_NAME, FilenameUtils.getName(fileName)));
}
}
代码示例来源:origin: us.fatehi/schemacrawler
Graphviz.fromString(dotSource).render(format).toFile(outputFile.toFile());
代码示例来源:origin: us.fatehi/schemacrawler-integrations
Graphviz.fromString(dotSource).render(format).toFile(outputFile.toFile());
代码示例来源:origin: nidi3/graphviz-java
private static String render(String raw) {
final int pos = raw.indexOf("@@@");
final Options options;
final String src;
if (pos < 0) {
options = Options.create().format(SVG_STANDALONE);
src = raw;
} else {
options = Options.fromJson(raw.substring(0, pos));
src = raw.substring(pos + 3);
}
return Graphviz.fromString(src)
.engine(options.engine)
.totalMemory(options.totalMemory)
.yInvert(options.yInvert)
.render(options.format).toString();
}
代码示例来源:origin: com.simiacryptus/mindseye-test
log.eval(() -> {
return Graphviz.fromGraph(TestUtil.toGraph(network))
.height(400).width(600).render(Format.PNG).toImage();
});
代码示例来源:origin: com.simiacryptus/mindseye-labs
log.eval(() -> {
return Graphviz.fromGraph(TestUtil.toGraph(network))
.height(400).width(600).render(Format.PNG).toImage();
});
代码示例来源:origin: com.simiacryptus/mindseye
log.eval(() -> {
return Graphviz.fromGraph(TestUtil.toGraph(network))
.height(400).width(600).render(Format.PNG).toImage();
});
代码示例来源:origin: nidi3/graphviz-java
public static void createFontTest(String name, double adjust, File output) throws IOException {
final Node width = node("If text is too narrow, increase fontAdjust. If it's too wide, decrease it.");
final Node center = node(Label.html("A very long node label that should be centered inside the border<br/>"
+ "If text is too much left, increase fontAdjust.<br/>"
+ "If it's too much right, decrease it."));
Graphviz.fromGraph(graph()
.nodeAttr().with(Font.name(name), Shape.RECTANGLE)
.with(width.link(center)))
.fontAdjust(adjust)
.render(PNG)
.toFile(output);
}
代码示例来源:origin: com.simiacryptus/mindseye
log.eval(() -> {
return Graphviz.fromGraph(TestUtil.toGraph(fwdNetwork))
.height(400).width(600).render(Format.PNG).toImage();
});
log.eval(() -> {
return Graphviz.fromGraph(TestUtil.toGraph(revNetwork))
.height(400).width(600).render(Format.PNG).toImage();
});
log.eval(() -> {
return Graphviz.fromGraph(TestUtil.toGraph(supervisedNetwork))
.height(400).width(600).render(Format.PNG).toImage();
});
代码示例来源:origin: com.simiacryptus/mindseye-labs
log.eval(() -> {
return Graphviz.fromGraph(TestUtil.toGraph(fwdNetwork))
.height(400).width(600).render(Format.PNG).toImage();
});
log.eval(() -> {
return Graphviz.fromGraph(TestUtil.toGraph(revNetwork))
.height(400).width(600).render(Format.PNG).toImage();
});
log.eval(() -> {
return Graphviz.fromGraph(TestUtil.toGraph(supervisedNetwork))
.height(400).width(600).render(Format.PNG).toImage();
});
内容来源于网络,如有侵权,请联系作者删除!