How do I change the border style of a rectangle

0 votes
asked Jun 7 by newportg (180 points)

Hi,

 

I want to change the border style of a rectangle within a skinparam block.

I've tried this, but it doesnt work.

skinparam rectangle {
    BorderColor<<Software System>> ##[dashed]Green
}
 
whats the answer.
Thanks
Gary

1 Answer

0 votes
answered Jun 10 by plantuml (134,510 points)

Right now,  you cannot define dashed rectangle. This only applies to links.

The only setting available beside colors is "round corner".

Working example:

@startuml
skinparam rectangle {
    BorderColor Blue
    BorderColor<<Software System>> Green
    RoundCorner<<Software System>> 25
}
rectangle rect1<<Software System>>
rectangle rect2

rect1 -[dashed]-> rect2
@enduml

http://www.plantuml.com/plantuml/uml/RO-z2i9048JxUufzWHG9s8KZ98MzASLYSTSVlDkLlJj4n7St1a48cMgO-M2OBcMqN69mwNQLEnf6C3vcb7DWU3cOrAiHsw113VfGU1csxQYd_41Z69yfS_GUjiOiCxZJ8ZIe2Q-2pSQztN_nw-eLRe4qRWvggFQ4wS9qgFolw5Xe-lC1

We might improve this in the future, but it's difficult to find a nice syntax. Ideas welcome!

Regards,

commented Oct 27 by anonymous
What's against BorderStyle (solid/dashed/dotted)? We already have BorderColor...
commented Oct 27 by plantuml (134,510 points)
Well, really nothing :-)
We were out of creative inspiration here.

So with last beta, http://beta.plantuml.net/plantuml.jar

you can have:

@startuml
skinparam rectangle {
    BorderColor Blue
    BorderColor<<Software System>> Green
    RoundCorner<<Software System>> 25
    BorderStyle<<Software System>> dashed
    BorderStyle dotted
}
rectangle rect1<<Software System>>
rectangle rect2

rect1 -[dashed]-> rect2
@enduml

Tell us if it's what you were looking for.
(And if you find issues, because we made something quick&dirty)
commented Oct 29 by anonymous
You guys are quick, awesome! I'll take it for a testdrive this week. If I find anything I'll post it in this thread. Cheers!
commented Nov 6 by anonymous
It works. I do have one more request though: I'd like to use it like this:
skinparam rectangle {
    borderColor<<System Boundry>> #ababab
    borderStyle<<System Boundry>> dashed
    borderThickness<<System Boundry>> 1
    roundCorner<<System Boundry>> 15
    fontColor<<System Boundry>> #ababab
}
wihch doesn't work yet. Would that be a valid use case for you and (relatively) easy to implement?

Cheers!
commented Nov 7 by plantuml (134,510 points)
Thanks for the feedback. It's fixed in last beta
http://beta.plantuml.net/plantuml.jar
Tell us if you find other issues!
...