How can I define small (outer) rectangles?

0 votes
asked Jul 1, 2021 in Question / help by kirchsth (3,840 points)

I want to use surrounding rectangles (eg. red and green) as additional markers of a component.


How can I reduce the size of them that I have e.g. only 5 pixels in all directions, without stereotype and empty text?

Thank you and best regards

1 Answer

0 votes
answered Jul 1, 2021 by The-Lu (57,460 points)

Hello K.,

Here is a funny workaround, as:

hide stereotype

rectangle {
  .zoneGreen {
    LineColor green
    LineThickness 10
  .zoneRed {
    LineColor red
    LineThickness 10

group {
  BackGroundColor green
  LineColor green
  LineThickness 1

person "person" <<p>>
rectangle "comp green" as cg <<zoneGreen>>

card {
rectangle "comp red+green" as crg <<zoneRed>>

rectangle "comp red" as cr <<zoneRed>>
person -> cg

And it shows some defects on the styles of nested elements (cf. card vs group crying)
No other group or nested elements are possible without green border !!!

If that can help, but it is only a demonstrative workaround...wink