toSVG method

dynamic toSVG(
  1. dynamic decimalPlaces
)

Convert the path to an SVG

Implementation

toSVG(decimalPlaces) {
    var svg = '<path d="';
    svg += this.toPathData(decimalPlaces);
    svg += '"';
    if (this.fill != null && this.fill != 'black') {
        if (this.fill == null) {
          svg += ' fill="none"';
        } else {
          svg += ' fill="' + this.fill + '"';
        }
    }

    if (this.stroke) {
        svg += ' stroke="' + this.stroke + '" stroke-width="${this.strokeWidth}"';
    }

    svg += '/>';
    return svg;
}