是否可以使用真实图标获得图例中类图的字段/方法可见性标签的关键字?
即在图表中获取表格中的真实图标
@startuml
class Dummy {
-field1
#field2
~method1()
+method2()
}
legend
|= field |= method |= |
| - | - | private |
| # | # | protected |
| ~ | ~ | package private |
| + | + | public |
endlegend
@enduml
我尝试过的事情没有成功:
这非常好(对我的目的来说当然足够好):
@startuml
class Dummy {
-field1
#field2
~method1()
+method2()
}
skinparam legendBackgroundColor #ffffff
legend
|= field |= method |= |
| <img:http://s.plantuml.com/private-field.png> | <img:http://s.plantuml.com/private-method.png> | private |
| <img:http://s.plantuml.com/protected-field.png> | <img:http://s.plantuml.com/protected-method.png> | protected |
| <img:http://s.plantuml.com/package-private-field.png> | <img:http://s.plantuml.com/package-private-method.png> | package private |
| <img:http://s.plantuml.com/public-field.png> | <img:http://s.plantuml.com/public-method.png> | public |
endlegend
@enduml