plantuml - 是否可以在 plantUML 中为 UML 项目使用自定义图像?

标签 plantuml

当您想要创建标准 UML 图时,PlantUML 非常强大。

但我目前正在考虑使用 PlantUML 来记录 EIP 路由(如这些图像上的路由: https://www.google.de/search?q=camel+route&safe=off&source=lnms&tbm=isch )。

如果您可以为类指定另一个图像而不是普通框,这将非常容易。类似于 SVG 或 WMF 图像或 Sparx Enterprise Architect 中的形状脚本。

我在文档中找到的唯一自定义图像,这些小 Sprite ......

最佳答案

来自PlantUML's Language Specification

Legacy HTML

You can mix Creole with the following HTML tags:

...

  • <img:file> : the file must be accessible by the filesystem
  • <img:http://plantuml.com/logo3.png> : the URL must be available from the Internet

看来这应该不是问题。还有一个PlantUML Word Plug-in ,这可能使您能够将图像粘贴到默认图像上。

以下 PlantUML 代码呈现一个简单的图表 - 引用的图像必须位于正确的位置...

object "inbound message" as m1
object "XML Splitter" as s1

m1 : <img:MessageIcon.gif>
s1 : <img:SplitterIcon.gif>
m2 : <img:MessageIcon.gif>

m1 -> s1
s1 -> m2

enter image description here

关于plantuml - 是否可以在 plantUML 中为 UML 项目使用自定义图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34364024/

相关文章:

c++ - 如何在 plantuml 中编写 typedef 和别名

plantuml : grouping sequence makes actor appears

ubuntu-14.04 - 在 Ubuntu 14.04 上使用 Netbeans 8 时不会显示 PlantUML 插件的新项目选项

plantuml - PlantUML 中的网络图未按预期工作?

c# - 生成 docfx 后 PlantUml 不呈现图表

Plantuml 两个类之间的几个箭头

python - iPython notebook plantuml 扩展

documentation - 如何包含 .iuml 路径以在 Doxygen 中生成 PlantUML 图