【问题标题】:How to make Class name bold in plant UML如何在plantUML中使类名加粗
【发布时间】:2022-08-24 02:20:59
【问题描述】:

可以通过使类抽象来将 PlantUML 中的类名样式设置为斜体。有没有办法设置类名的样式,以便它是大胆的就像下面的示例类一样?

    标签: class-diagram plantuml


    【解决方案1】:

    您可以将类的名称放在“** 和 **”之间。

    例子:

    @startuml
    
    class **House** {
    
    }
    
    @enduml
    

    【讨论】:

    • 出色的。但是有没有办法系统地得到这个,即使用 skinparam
    【解决方案2】:

    现在有工作支持样式(查看 PlantUML 问答论坛了解更多信息)。

    @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
    

    【讨论】:

      猜你喜欢
      • 2022-07-31
      • 1970-01-01
      • 2013-03-26
      • 2019-02-12
      • 2021-08-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多