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

rdm*_*ler 11 plantuml

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

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

如果您可以为类指定另一个图像而不是普通框,那么这将非常简单.像Sparx Enterprise Architect中的SVG或WMF图像或形状脚本.

我在文档中找到的唯一自定义图像,那些微小的精灵......

小智 18

来自PlantUML的语言参考指南

    11.6 Legacy HTML
    Some HTML tags are also working:
    <img:file>  : the file must be accessible by the filesystem
    <img:http://url>   : the URL must be available from the Internet
Run Code Online (Sandbox Code Playgroud)

它似乎不应该是一个问题.还有一个PlantUML Word插件,可以让您将图像粘贴到默认图像上.

以下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
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

  • 可以使用“{scale}”更改图像的大小,例如:“``&lt;img:http://plantuml.com/logo3.png{scale=0.5}&gt;``` (2认同)

kct*_*ang 6

plantuml-icon-font-sprites允许在plantuml中使用超棒的字体图标。这很棒!