我想创建一个具有多行的分组对象并用背景颜色填充对象。但是,如您所见,背景不将线条视为框架。
是否可以仅填充行内的分组对象?
无法使用分组线(样式将应用于具有矩形形状的整个组),但您可以使用Arrange > Insert > Shape创建自定义形状。您可以在此处或此处找到如何执行此操作的说明。如果要在插入后编辑形状,可以使用右侧格式面板中样式选项卡中的编辑形状来执行此操作(也可以编辑一些 draw.io 形状)。
与您的图像类似的示例形状:
<shape h="100" w="100" aspect="variable" strokewidth="inherit">
<foreground>
<path>
<move x="50" y="0" />
<line x="80" y="40" />
<line x="100" y="50" />
<line x="60" y="100" />
<line x="30" y="100" />
<line x="0" y="60" />
<close />
</path>
<fillstroke />
</foreground>
</shape>
记住使用<fillstroke />
,或者<fill />
如果你想要彩色背景。