如何在PlantUML中将类名加粗

4
可以通过将类定义为抽象类来使PlantUML中的类名以斜体样式进行排版。那么,有没有一种方法可以使类名以示例类所示的加粗样式进行排版呢?

Bold class name

2个回答

4
您可以在“**和**”之间放置类的名称。
例如:
@startuml

class **House** {

}

@enduml

很好。但是有没有一种系统化的方法来实现这个,比如使用 skinparam - Christophe

2

现在有工作支持样式(请查看PlantUML Q&A论坛获取更多信息)。

@startuml
<style>
classDiagram {
  class {
      ' attributes and methods
      FontColor blue
      BackgroundColor yellow
      ' class name
      header {
        FontSize 20
        FontColor violet
        FontStyle bold
      }
  }
}
</style>

hide circle

class User {
  name : String
  id : integer
  toString() : String
}

@enduml

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接