Enable "RoundCorner" and "DiagonalCorner" for Participant Stereotypes on Sequence Diagrams

0 votes
asked Feb 26 in Wanted features by Steven Mileham
The following sets round corners globally

@startuml
  skinparam roundcorner 20
  participant Test
@enduml

Ideally I would like to be able to set both round and diagonal corners per stereotype, e.g.

@startuml
skinparam participant {
    BackgroundColor<< number1 >> #GoldenRod
    DiagonalCorner<< number 1>> 20

    BackgroundColor<< number2 >> #Green
    RoundCorner<< number2 >> 20
}

participant Test
participant Test1 <<number1>>
participant Test2 <<number2>>
@enduml
commented Feb 27 by kjw

Try this :

@startuml
skinparam useBetaStyle true
' style enclosure declaration
<style>
    ' scope to sequenceDiagram elements
    sequenceDiagram {   

     ' scope to actor element types
      actor { 
        FontColor Blue 
      }
     
     ' define a new style, using CSS class syntax
     .myStyle {
        FontColor Red
     }

    ' define a new style, using CSS class syntax
     .number1 {
        BackgroundColor #GoldenRod
        RoundCorner 20
     }

        ' define a new style, using CSS class syntax
     .number2 {
        BackgroundColor  #Green
        RoundCorner 20
     }
    }

</style> 

' printed in blue
actor Bob 
' this will now be printed in Red 
actor Sally <<myStyle>>
participant Test
participant Test1 <<number1>>
participant Test2 <<number2>>
@enduml

commented Feb 27 by Steven Mileham

Interesting!  I wasn't aware of the "useBetaStyle" parameter, is this replacing the existing skinparam approach, if so, do we know when?

It seems to allow for the changes against the stereotype, but still doesn't support DiagonalCorner though.

Also, either by design or by bug, it no longer shows the stereotype in the Participant box.

commented Feb 27 by plantuml (226,800 points)
The new style feature is still under developpement :-)

See http://alphadoc.plantuml.com/doc/asciidoc/en/style-evolution

We are going to investigate about the stereotype not showing.

1 Answer

0 votes
answered Feb 28 by plantuml (226,800 points)
commented Mar 2 by Steven Mileham
Looking good!  Will you be supporting DiagonalCorner too?
commented Mar 3 by plantuml (226,800 points)
We've just implemented it in last beta http://beta.plantuml.net/plantuml.jar

Tell us if it's not working for you
...