@@ -67,17 +67,34 @@ rectangle C4VersionDetailsArea <<legendArea>> [
67
67
68
68
!$STEREOTYPE_FONT_SIZE ?= 12
69
69
!global $TRANSPARENT_STEREOTYPE_FONT_SIZE = $STEREOTYPE_FONT_SIZE /2
70
-
71
70
!$TECHN_FONT_SIZE ?= 12
72
- !$ROUNDED_BOX_SIZE ?= 25
73
- !$EIGHT_SIDED_SIZE ?= 18
74
71
75
72
!$ARROW_FONT_SIZE ?= 12
76
73
77
74
!$LEGEND_DETAILS_SMALL_SIZE ?= 10
78
75
!$LEGEND_DETAILS_NORMAL_SIZE ?= 14
79
76
!global $LEGEND_DETAILS_SIZE = $LEGEND_DETAILS_SMALL_SIZE
80
77
78
+ ' element symbols typically 4 times too big in legend
79
+ !$LEGEND_IMAGE_SIZE_FACTOR ?= 0. 25
80
+
81
+ !$ROUNDED_BOX_SIZE ?= 25
82
+ !$EIGHT_SIDED_SIZE ?= 18
83
+
84
+ ' Default element wrap width (of an element)
85
+ !$DEFAULT_WRAP_WIDTH ?= 200
86
+ ' Maximum size in pixels, of a message (in a sequence diagram?)
87
+ !$MAX_MESSAGE_SIZE ?= 150
88
+ ' PlantUML supports no DETERMINISTIC/automatic line breaks of "PlantUML line" (C4 Relationships)
89
+ ' therefore Rel...() implements an automatic line break based on spaces (like in all other objects).
90
+ ' If a $type contains \n then these are used (and no automatic space based line breaks are done)
91
+ ' $REL_TECHN_MAX_CHAR_WIDTH defines the automatic line break position
92
+ !$REL_TECHN_MAX_CHAR_WIDTH ?= 35
93
+ !$REL_DESCR_MAX_CHAR_WIDTH ?= 32
94
+
95
+ ' internal
96
+ ' ##################################
97
+
81
98
!global $ROUNDED_BOX = "roundedBox "
82
99
!global $EIGHT_SIDED = "eightSided "
83
100
@@ -91,8 +108,8 @@ rectangle C4VersionDetailsArea <<legendArea>> [
91
108
92
109
skinparam defaultTextAlignment center
93
110
94
- skinparam wrapWidth 200
95
- skinparam maxMessageSize 150
111
+ skinparam wrapWidth $DEFAULT_WRAP_WIDTH
112
+ skinparam maxMessageSize $MAX_MESSAGE_SIZE
96
113
97
114
skinparam LegendFontColor $LEGEND_FONT_COLOR
98
115
skinparam LegendBackgroundColor $LEGEND_BG_COLOR
@@ -465,9 +482,9 @@ $elementSkin
465
482
' ,scale= ... has to be first (...,color=black,scale=0.25... is invalid too)
466
483
!if (%strpos ($sprite , "=" ) < 0 )
467
484
!if (%substr ($sprite , 0 , 4 ) == "img :")
468
- !$smallSprite = $sprite + "{scale =0. 25 }"
485
+ !$smallSprite = $sprite + "{scale = " + $ LEGEND_IMAGE_SIZE_FACTOR + " }"
469
486
!else
470
- !$smallSprite = $sprite + ",scale =0. 25 "
487
+ !$smallSprite = $sprite + ",scale = " + $ LEGEND_IMAGE_SIZE_FACTOR
471
488
!endif
472
489
!else
473
490
!$smallSprite = $sprite
@@ -870,13 +887,6 @@ $elementSkin
870
887
' Line breaks
871
888
' ##################################
872
889
873
- ' PlantUML supports no DETERMINISTIC/automatic line breaks of "PlantUML line" (C4 Relationships)
874
- ' therefore Rel...() implements an automatic line break based on spaces (like in all other objects).
875
- ' If a $type contains \n then these are used (and no automatic space based line breaks are done)
876
- ' $REL_TECHN_MAX_CHAR_WIDTH defines the automatic line break position
877
- !global $REL_TECHN_MAX_CHAR_WIDTH = 35
878
- !global $REL_DESCR_MAX_CHAR_WIDTH = 32
879
-
880
890
!unquoted function $breakText ($text , $usedNewLine , $widthStr = "- 1 ")
881
891
!$width = %intval ($widthStr )
882
892
!$multiLine = ""
0 commit comments