如何设置圆角节点样式的半径?

6

我有一个圆角节点的图形。如何影响圆角的半径?或者我需要接受graphviz的设置为固定值吗?默认设置是什么?

digraph G { 
    node [shape=rectangle style=rounded]
}

非常感谢您提前的帮助!

1个回答

6

很抱歉,我遇到了同样的问题。看源代码... 它硬编码成了12!

shapes.c#18 =>#define RBCONST 12

没有办法改变它。唯一的方法是修改生成的svg:

  • 不再使用四舍五入
  • 找到:
<polygon fill="#8a2be2" stroke="#8a2be2" points="194,-344 140,-344 140,-308 194,-308 194,-344"></polygon>
  • 替换为:
<rect x="140" y="-344" rx="5" ry="5" width="54" height="36" style="fill: rgb(181, 157, 224);stroke: rgb(138, 43, 226);stroke-width: 1px;opacity: 1;"></rect>

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