#240 Fix -DRELATIVE_INCLUDE="absolute/relativeToDiagram" (2 - to many files)

pull/253/head
KIRCHSTH 4 years ago committed by kirchsth
parent eed1546d1d
commit 2fd6c7a58d

@ -1,47 +0,0 @@
@startuml
' convert it with additional command line argument -DRELATIVE_INCLUDE="./.." to use locally
!if %variable_exists("RELATIVE_INCLUDE")
!include %get_variable_value("RELATIVE_INCLUDE")/C4_Component.puml
!else
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!endif
' Update the generic boundary style and the "system", "enterprise", "container" boundaries styles too
UpdateBoundaryStyle($bgColor="gold", $fontColor="brown", $borderColor="brown")
' (Re-)Updates the system boundary styles; re-set $bgColor avoids '(no back color)' in legend too
UpdateSystemBoundaryStyle($bgColor="gold", $fontColor="white", $borderColor="white")
Boundary(b, "A Boundary") {
}
Container_Boundary(cb, "A Container Boundary") {
}
System_Boundary(sb, "A System Boundary") {
}
' defines a new border style incl. new border type
AddBoundaryTag("repository", $bgColor="green", $fontColor="white", $borderColor="white", $shadowing="true", $shape = RoundedBoxShape(), $type="GitHub repository")
Boundary(c4Respository, "plantuml-stdlib/C4-PlantUML", $tags="repository") {
Component(readMe, "README.md", "Markdown")
}
' boundary tags are internally extended with '_boundary' that it uses a different name space
' this enables different element and boundary styles for the same tag name
AddBoundaryTag("v1", $bgColor="lightgreen", $fontColor="green", $borderColor="green")
AddElementTag("v1", $bgColor="lightred", $fontColor="red", $borderColor="red")
Boundary(anotherBoundary, "Another Boundary", $type="BOUNDARY TYPE", $tags="v1") {
Component(anotherComponent, "Another Component", $techn="COMPONENT TYPE", $tags="v1", $descr="Component and boundary use different tag name spaces that both v1 tags can use different styles")
}
Lay_R(b, cb)
Lay_R(cb, sb)
Lay_D(b, c4Respository)
Lay_R(c4Respository, anotherBoundary)
SHOW_LEGEND()
@enduml

@ -1,36 +0,0 @@
@startuml
' convert it with additional command line argument -DRELATIVE_INCLUDE="./.." to use locally
!if %variable_exists("RELATIVE_INCLUDE")
!include %get_variable_value("RELATIVE_INCLUDE")/C4_Component.puml
!else
!include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Component.puml
!endif
C4Version()
' person legend displays the correct sprite
SHOW_PERSON_SPRITE("person2")
' HIDE_PERSON_SPRITE()
' SHOW_PERSON_PORTRAIT()
' SHOW_PERSON_OUTLINE()
' UpdateElementStyle("person", $legendText="Person with correct legend", $sprite="person2")
' missing definitions are reused from last UpdateElementStyle() in legends too
UpdateElementStyle("person")
UpdateElementStyle("external_system", $bgColor="chocolate", $fontColor="orange", $borderColor="orange", $shadowing="true", $shape=RoundedBoxShape(), $sprite="robot", $techn="my tech", $legendSprite="robot,scale=0.25")
' missing definitions are reused from last UpdateElementStyle() in legends too
UpdateElementStyle("external_system")
' AddExternalSystemTag("micro_service", $shape=EightSidedShape())
' AddElementTag("storage", $shadowing="true", $shape=RoundedBoxShape())
System_Ext(system, "System")
Person(person, "Person")
' System_Ext(system1A, "System 1A", $tags="micro_service")
' System_Ext(system2, "System 2", $tags = "storage")
SHOW_LEGEND(false)
@enduml
Loading…
Cancel
Save