绘制各种图形
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| @startuml actor actor agent agent artifact artifact boundary boundary card card circle circle cloud cloud collections collections component component control control database database entity entity file file folder folder frame frame interface interface label label node node package package queue queue stack stack rectangle rectangle storage storage usecase usecase @enduml
|
并且相关图形是可以嵌套的。参考 deployment-diagram
如果需要使用包含空格的图形,可以使用如下方式:
1
| rectangle "test with space" as t1
|
设置颜色
1
| rectangle test #red/white
|
预定义颜色参考
也可以使用类似css #rgb的方式定义颜色
颜色梯度渐变可以通过如下方式设置分隔两个颜色
绘制箭头
绘制简单箭头
1 2 3 4 5
| @startuml rectangle a #red rectangle b a --> b @enduml
|
###增加如下u/d/l/r改变箭头方向
###控制箭头形状
1 2 3 4 5 6 7 8 9 10 11
| @startuml rectangle a #red rectangle b rectangle c rectangle d
a -[#pink,dashed,thickness=3]u-> b a -[#black,dotted]d----> c a -l-> d a -r-> e @enduml
|
控制箭头线长度