plantuml-stdlib / C4-PlantUML

C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
MIT License
6.41k stars 1.1k forks source link

Add support for lineThickness in AddRelTag (based on #218, #235) #254

Closed kirchsth closed 2 years ago

kirchsth commented 2 years ago

based on PR #218 from @netrounds-fredrik and PR #235 from @fredde-fisk. Thank you for your preparatory work.

AddRelTag() is extended with a new $lineThickness argument, like AddRelTag("tag1", $lineThickness=3)

@startuml
' !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Component.puml

AddRelTag("tag1", $lineThickness=3)
AddRelTag("tag2", $lineColor="darkblue", $lineStyle=DottedLine(), $lineThickness=8)

Container(a, "A")
Container(b, "B")
Container(c, "C")

Rel(a, c, "normal")
Rel(a, b, "thickness 3", $tags="tag1")
Rel(b, c, "blue, dotted, thickness 8", $tags="tag2")

SHOW_LEGEND()
@enduml

It can be tested with my extended branch

BR Helmut

PS.: during the tests with TestLegend.puml I saw that colors of relationships can be combined, therefore I updated the README.md and TestLegend.puml too

  • (Obsolete, fixed in PlantUML >=v.1.2022.2)
    Colors of relationship tags cannot be automatically merged (PlantUML does not support it).
kirchsth commented 2 years ago

thank you, readme is updated