guru.nidi.graphviz.engine.Graphviz.width()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中guru.nidi.graphviz.engine.Graphviz.width()方法的一些代码示例,展示了Graphviz.width()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graphviz.width()方法的具体详情如下:
包路径:guru.nidi.graphviz.engine.Graphviz
类名称:Graphviz
方法名:width

Graphviz.width介绍

暂无

代码示例

代码示例来源: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: 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: com.simiacryptus/mindseye-labs

log.eval(() -> {
 return Graphviz.fromGraph(TestUtil.toGraph(network))
   .height(400).width(600).render(Format.PNG).toImage();
});

代码示例来源: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

log.eval(() -> {
 return Graphviz.fromGraph(TestUtil.toGraph(network))
   .height(400).width(600).render(Format.PNG).toImage();
});

代码示例来源:origin: com.simiacryptus/mindseye-test

log.eval(() -> {
  return Graphviz.fromGraph(TestUtil.toGraph((DAGNetwork) smallLayer))
    .height(400).width(600).render(Format.PNG).toImage();
 });
} catch (Throwable e) {
  @Nonnull DAGNetwork network = (DAGNetwork) explode;
  log.eval(() -> {
   @Nonnull Graphviz graphviz = Graphviz.fromGraph(TestUtil.toGraph(network)).height(400).width(600);
   @Nonnull File file = new File(log.getResourceDir(), log.getName() + "_network.svg");
   graphviz.render(Format.SVG_STANDALONE).toFile(file);

代码示例来源:origin: com.simiacryptus/mindseye-labs

log.eval(() -> {
  return Graphviz.fromGraph(TestUtil.toGraph((DAGNetwork) smallLayer))
    .height(400).width(600).render(Format.PNG).toImage();
 });
} catch (Throwable e) {
  @Nonnull DAGNetwork network = (DAGNetwork) explode;
  log.eval(() -> {
   @Nonnull Graphviz graphviz = Graphviz.fromGraph(TestUtil.toGraph(network)).height(400).width(600);
   @Nonnull File file = new File(log.getResourceDir(), log.getName() + "_network.svg");
   graphviz.render(Format.SVG_STANDALONE).toFile(file);

代码示例来源:origin: com.simiacryptus/mindseye

log.eval(() -> {
  return Graphviz.fromGraph(TestUtil.toGraph((DAGNetwork) smallLayer))
    .height(400).width(600).render(Format.PNG).toImage();
 });
} catch (Throwable e) {
  @Nonnull DAGNetwork network = (DAGNetwork) explode;
  log.eval(() -> {
   @Nonnull Graphviz graphviz = Graphviz.fromGraph(TestUtil.toGraph(network)).height(400).width(600);
   @Nonnull File file = new File(log.getResourceDir(), log.getName() + "_network.svg");
   graphviz.render(Format.SVG_STANDALONE).toFile(file);

代码示例来源:origin: com.simiacryptus/mindseye-test

log.eval(() -> {
 return Graphviz.fromGraph(TestUtil.toGraph(imageNetwork))
   .height(400).width(600).render(Format.PNG).toImage();
});

代码示例来源:origin: com.simiacryptus/mindseye

log.eval(() -> {
 return Graphviz.fromGraph(TestUtil.toGraph(imageNetwork))
   .height(400).width(600).render(Format.PNG).toImage();
});

代码示例来源:origin: com.simiacryptus/mindseye-labs

log.eval(() -> {
 return Graphviz.fromGraph(TestUtil.toGraph(imageNetwork))
   .height(400).width(600).render(Format.PNG).toImage();
});

代码示例来源:origin: com.simiacryptus/mindseye-test

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

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();
});

相关文章