Home > Mobile >  In SVG.Net how to set 'Fill' to 'None'?
In SVG.Net how to set 'Fill' to 'None'?

Time:09-18

Using SVG.Net (https://github.com/svg-net/SVG) how do I set Fill to None? Currently trying 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
    )

Which gives output: <rect x="50" y="250" width="87.85068" height="21.333334px" style="stroke:blue;" />

Whereas I want: <rect x="50" y="250" width="87.85068" height="21.333334px" style="stroke:blue;fill:none" />

CodePudding user response:

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

or

Fill = SvgPaintServer.None

CodePudding user response:

Fill = Svg.SvgColourServer.None seems to work.

  • Related