在 WPF 应用程序中使用 GraphViz

发布于 2024-08-12 04:10:55 字数 100 浏览 7 评论 0原文

我想在我的 WPF 应用程序中使用 GraphViz,而不安装 Graphviz。

AT&T(或其他人)是否分发这样的 DLL?

谢谢, 凯末尔

I want to use GraphViz in my WPF application without installing Graphviz.

Does AT&T (or somebody else) distribute such a DLL?

Thanks,
Kemal

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

紫南 2024-08-19 04:10:55

您可以将 dot 工具从源代码编译为 DLL。这就是我不久前所做的。我将 QuickGraph 与 GraphViz 结合使用,并使用稍微修改过的控件版本渲染图形,您可以从此处获取 http://www.codeproject.com/KB/WPF/Dot2Wpf.aspx

You can compile the dot tool as DLL from source. That is what I did a while back. I use QuickGraph with GraphViz and render the graph with slightly modified version of the control you can get from here http://www.codeproject.com/KB/WPF/Dot2Wpf.aspx

云淡月浅 2024-08-19 04:10:55

显然 ImageMagick 可以读取 graphviz DOT 格式: http://www.imagemagick.org/script/formats .php

也许您可以使用此包装器从.NET 调用 ImageMagick http://imagemagick.codeplex.com/ 并让它读取 DOT 并输出为 PNG 或其他什么?我从未尝试过,据我所知,ImageMagick 可能最终会生成命令行程序!

(我很久以前就使用过 ASP classic 中的 graphviz,生成了 graphviz 可执行文件,结果很好。)

Apparently ImageMagick can read the graphviz DOT format: http://www.imagemagick.org/script/formats.php

Perhaps you can call ImageMagick from .NET using this wrapper http://imagemagick.codeplex.com/ and get it to read DOT and output as PNG or something? I've never tried, and for all I know ImageMagick might end up spawning the command line program anyway!

(I have used graphviz from ASP classic a long time ago by spawning the graphviz executable with good results BTW.)

太阳哥哥 2024-08-19 04:10:55

尝试 graphviz 库 .NET 包装器 http://code.google.com/p/graphviznet/

它接受托管对象形式的图形描述,通过 graphviz 布局引擎运行并获取数据。

如果您不想安装完整的graphviz,您可以只复制所需的dll集,请参阅演示项目中的readme.txt,项目还包含一个用于显示图形的WPF控件。

Try graphviz library .NET wrapper http://code.google.com/p/graphviznet/.

It accepts the description of a graph in the form of managed objects, runs through the graphviz layout engine and gets back the data.

If you don't want't to install complete graphviz, you can copy only required set of dll's, see readme.txt in demo project, project also contains a WPF control to display graphs.

关于从前 2024-08-19 04:10:55

许可

GraphViz 根据 Common Public License 获得许可(请参阅 CPL 常见问题解答

同样来自 GraphViz 站点:

有关常见问题的更多信息
公共许可证,请参阅常见问题解答。如果你
对什么有任何担忧
许可证意味着,特别是如果金钱
涉及,您应该联系
知识产权律师。

将 GraphViz 作为 DLL 使用

GraphViz 是一个可执行程序,而不是 DLL - 要在您的应用程序中使用它,您需要使用正确的命令行参数生成可执行文件并获取结果输出。

使用 GraphViz 的其他方式

有一个 COM 组件可以解析 DOT 语言并呈现它:
WinGraphViz 但我从未使用过它,也无法保证它的工作效果。

旁白:如果您在 WPF 中进行图形工作,我强烈建议您使用 QuickGraph 来实际管理图形 - 它还会输出到 GraphViz 兼容的文本文件。

Licensing

GraphViz is licensed under the Common Public License (see the CPL FAQ)

Also from the GraphViz site:

For more information on the Common
Public License, see the FAQ. If you
have any concerns about the what the
license means, especially if money is
involved, you should contact an
intellectual property lawyer.

Using GraphViz as a DLL

GraphViz is an executable program rather than a DLL - to use it in your app you need to spawn the executable with the correct command line parameters and pick up the resulting output.

Other ways of using GraphViz

There is a COM component available that parses the DOT language and renders it:
WinGraphViz but I've never used it and cannot vouch for how well it works.

Aside: If you are doing graph work in WPF I thoroughly recommend using QuickGraph to actually manage the graph - it will also output to GraphViz compatible text files.

青巷忧颜 2024-08-19 04:10:55

看看这个相当新的面向对象的 .NET Graphviz 包装器: https://github.com/ Rubjerg/Graphviz.NetWrapper

由于它通过对其附带的 Graphviz 库进行外部函数调用来工作,因此您无需安装任何东西。

Have a look at this fairly new object-oriented Graphviz wrapper for .NET: https://github.com/Rubjerg/Graphviz.NetWrapper

Since it works by doing foreign function calls to the Graphviz library it ships with, you don't have to install anything.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文