MCPcopy Create free account
hub / github.com/fogleman/ln / ToSVG

Method ToSVG

ln/path.go:109–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107}
108
109func (p Path) ToSVG() string {
110 var coords []string
111 for _, v := range p {
112 coords = append(coords, fmt.Sprintf("%f,%f", v.X, v.Y))
113 }
114 points := strings.Join(coords, " ")
115 return fmt.Sprintf("<polyline stroke=\"black\" fill=\"none\" points=\"%s\" />", points)
116}
117
118type Paths []Path
119

Callers 1

ToSVGMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected