@@ -34,6 +34,8 @@ rectangle C4VersionDetailsArea <<legendArea>> [
34
34
!$BOUNDARY_COLOR ?= "#444444 "
35
35
!$BOUNDARY_BG_COLOR ?= "transparent "
36
36
!$BOUNDARY_BORDER_STYLE ?= "dashed "
37
+ ' boundary symbols written in the same line, typically only 50% of the size in element
38
+ !$BOUNDARY_IMAGE_SIZE_FACTOR ?= 0. 5
37
39
38
40
!$LEGEND_TITLE_COLOR ?= "#000000 "
39
41
!$LEGEND_FONT_COLOR ?= "#FFFFFF "
@@ -595,13 +597,13 @@ $elementSkin
595
597
!endfunction
596
598
597
599
' element symbols typically 4 times too big in legend
598
- !function $smallVersionSprite ($sprite )
600
+ !function $smallVersionSprite ($sprite , $ imageScale = $ LEGEND_IMAGE_SIZE_FACTOR )
599
601
' ,scale= ... has to be first (...,color=black,scale=0.25... is invalid too)
600
602
!if (%strpos ($sprite , "=" ) < 0 )
601
603
!if (%substr ($sprite , 0 , 4 ) == "img :")
602
- !$smallSprite = $sprite + "{scale = " + $LEGEND_IMAGE_SIZE_FACTOR + "}"
604
+ !$smallSprite = $sprite + "{scale = " + $imageScale + "}"
603
605
!else
604
- !$smallSprite = $sprite + ",scale = " + $LEGEND_IMAGE_SIZE_FACTOR
606
+ !$smallSprite = $sprite + ",scale = " + $imageScale
605
607
!endif
606
608
!else
607
609
!$smallSprite = $sprite
@@ -1373,22 +1375,22 @@ $getLegendArea($alias, $hideStereotype, $details)
1373
1375
' Boundaries
1374
1376
' ##################################
1375
1377
1376
- !unquoted procedure UpdateBoundaryStyle ($elementName = "", $bgColor = "", $fontColor = "", $borderColor = "", $shadowing = "", $shape = "", $type = "", $legendText = "", $borderStyle = "", $borderThickness = "")
1378
+ !unquoted procedure UpdateBoundaryStyle ($elementName = "", $bgColor = "", $fontColor = "", $borderColor = "", $shadowing = "", $shape = "", $type = "", $legendText = "", $borderStyle = "", $borderThickness = "", $ sprite = "", $ legendSprite = "" )
1377
1379
!if ($elementName != "")
1378
1380
!$elementBoundary = $elementName + '_boundary '
1379
- UpdateElementStyle ($elementBoundary , $bgColor , $fontColor , $borderColor , $shadowing , $shape , "" , $type , $legendText , "" , $borderStyle , $borderThickness )
1381
+ UpdateElementStyle ($elementBoundary , $bgColor , $fontColor , $borderColor , $shadowing , $shape , $ sprite , $type , $legendText , $ legendSprite , $borderStyle , $borderThickness )
1380
1382
!else
1381
- UpdateElementStyle ("boundary" , $bgColor , $fontColor , $borderColor , $shadowing , $shape , "" , $type , $legendText , "" , $borderStyle , $borderThickness )
1383
+ UpdateElementStyle ("boundary" , $bgColor , $fontColor , $borderColor , $shadowing , $shape , $ sprite , $type , $legendText , $ legendSprite , $borderStyle , $borderThickness )
1382
1384
' simulate color inheritance
1383
- UpdateBoundaryStyle ("enterprise" , $bgColor , $fontColor , $borderColor , $shadowing , $shape , "Enterprise" , "" , $borderStyle , $borderThickness )
1384
- UpdateBoundaryStyle ("system" , $bgColor , $fontColor , $borderColor , $shadowing , $shape , "System" , "" , $borderStyle , $borderThickness )
1385
- UpdateBoundaryStyle ("container" , $bgColor , $fontColor , $borderColor , $shadowing , $shape , "Container" , "" , $borderStyle , $borderThickness )
1385
+ UpdateBoundaryStyle ("enterprise" , $bgColor , $fontColor , $borderColor , $shadowing , $shape , "Enterprise" , "" , $borderStyle , $borderThickness , $ sprite , $ legendSprite )
1386
+ UpdateBoundaryStyle ("system" , $bgColor , $fontColor , $borderColor , $shadowing , $shape , "System" , "" , $borderStyle , $borderThickness , $ sprite , $ legendSprite )
1387
+ UpdateBoundaryStyle ("container" , $bgColor , $fontColor , $borderColor , $shadowing , $shape , "Container" , "" , $borderStyle , $borderThickness , $ sprite , $ legendSprite )
1386
1388
!endif
1387
1389
!endprocedure
1388
1390
1389
- !unquoted procedure AddBoundaryTag ($tagStereo , $bgColor = "", $fontColor = "", $borderColor = "", $shadowing = "", $shape = "", $type = "", $legendText = "", $borderStyle = "", $borderThickness = "")
1391
+ !unquoted procedure AddBoundaryTag ($tagStereo , $bgColor = "", $fontColor = "", $borderColor = "", $shadowing = "", $shape = "", $type = "", $legendText = "", $borderStyle = "", $borderThickness = "", $ sprite = "", $ legendSprite = "" )
1390
1392
!$tagBoundary = $tagStereo + '_boundary '
1391
- AddElementTag ($tagBoundary , $bgColor , $fontColor , $borderColor , $shadowing , $shape , "" , $type , $legendText , "" , $borderStyle , $borderThickness )
1393
+ AddElementTag ($tagBoundary , $bgColor , $fontColor , $borderColor , $shadowing , $shape , $ sprite , $type , $legendText , $ legendSprite , $borderStyle , $borderThickness )
1392
1394
!endprocedure
1393
1395
1394
1396
' add _boundary to all tags that short tag version can be used
@@ -1410,20 +1412,24 @@ $getLegendArea($alias, $hideStereotype, $details)
1410
1412
!return $boundaryTags
1411
1413
!endfunction
1412
1414
1413
- !function $getBoundary ($label , $type )
1414
- !if ($type == "")
1415
- !return '== ' + $breakLabel ($label )
1415
+ !function $getBoundary ($sprite , $label , $type )
1416
+ !$line = '== '
1417
+ !if ($sprite != "")
1418
+ !$line = $line + $getSprite ($smallVersionSprite ($sprite , $BOUNDARY_IMAGE_SIZE_FACTOR )) + ' '
1416
1419
!endif
1417
- !if (type != "")
1418
- !return '== ' + $breakLabel ($label ) + '\n <size :' + $TECHN_FONT_SIZE + '>[' + $type + ']</size>'
1420
+ !$line = $line + $breakLabel ($label )
1421
+ !if ($type != "")
1422
+ !$line = $line + '\n <size :' + $TECHN_FONT_SIZE + '>[' + $type + ']</size>'
1419
1423
!endif
1424
+ !return $line
1420
1425
!endfunction
1421
1426
1422
1427
!unquoted procedure Boundary ($alias , $label , $type = "", $tags = "", $link = "")
1423
1428
!$boundaryTags = $addBoundaryPostfix ($tags )
1424
- ' nodes $type reuses $techn definition of $boundaryTags
1429
+ ' boundary $type reuses $techn definition of $boundaryTags
1425
1430
!$type = $toElementArg ($type , $boundaryTags , "ElementTagTechn ", "boundary ")
1426
- rectangle "$getBoundary($label, $type)" $toStereos ("boundary" , $boundaryTags ) as $alias $getLink ($link )
1431
+ !$sprite = $toElementArg ("", $boundaryTags , "ElementTagSprite ", "boundary ")
1432
+ rectangle "$getBoundary($sprite, $label, $type)" $toStereos ("boundary" , $boundaryTags ) as $alias $getLink ($link )
1427
1433
!endprocedure
1428
1434
1429
1435
' Boundary Styling
0 commit comments