1package seedmark23import "strconv"45func num(value float64) string { return strconv.FormatFloat(value, 'f', -1, 64) }67func circle(x, y, radius float64, fill string) string {8 return `<circle cx="` + num(x) + `" cy="` + num(y) + `" r="` + num(radius) + `" fill="` + fill + `"/>`9}1011func ellipse(x, y, rx, ry float64, fill string) string {12 return `<ellipse cx="` + num(x) + `" cy="` + num(y) + `" rx="` + num(rx) + `" ry="` + num(ry) + `" fill="` + fill + `"/>`13}1415func rect(x, y, width, height, rx float64, fill string) string {16 return `<rect x="` + num(x) + `" y="` + num(y) + `" width="` + num(width) + `" height="` + num(height) + `" rx="` + num(rx) + `" fill="` + fill + `"/>`17}1819func path(d, fill string) string { return strokePath(d, fill, "none", 0) }2021func strokePath(d, fill, stroke string, width float64) string {22 return `<path d="` + d + `" fill="` + fill + `" stroke="` + stroke + `" stroke-width="` + num(width) + `" stroke-linecap="round" stroke-linejoin="round"/>`23}2425func group(body, transform string) string {26 return `<g transform="` + transform + `">` + body + `</g>`27}