SVG.Net 如何将'Fill'设置为"无"?

  • 本文关键字:Net 设置 Fill SVG .net svg
  • 更新时间 :
  • 英文 :


使用SVG。Net (https://github.com/svg-net/SVG)如何设置填充为None?当前正在尝试Fill=null:

let borderRect =
new SvgRectangle(
X=SvgUnit(xPad + left), Y=SvgUnit(yPad + 0.f + float32 layer * tl.height),
Width=SvgUnit(textWidth lblTxt), Height=SvgUnit(SvgUnitType.Pixel, fontSize * (16.f / 12.f) ),
Stroke=new SvgColourServer(Color.Blue), Fill = null
)

输出如下:<rect x="50" y="250" width="87.85068" height="21.333334px" style="stroke:blue;" />

然而我想:<rect x="50" y="250" width="87.85068" height="21.333334px" style="stroke:blue;fill:none" />

Fill = Svg.SvgColourServer.None似乎有效。

Fill:none=Fill = new SolidBrush(System.Drawing.Color.Transparent)

Fill = SvgPaintServer.None

最新更新