func (svg *SVG) Link(href string, title string) {
	svg.printf("<a xlink:href=\"%s\" xlink:title=\"", href)
	xml.Escape(svg.Writer, []byte(title))
	svg.println("\">")
}
Link begins a link named "name", with the specified title.
Standard Reference: http://www.w3.org/TR/SVG11/linking.html#Links
package svg
import (
	"fmt"
	"io"
	"encoding/xml"
	"strings"
)
type SVG struct {
	Writer io.Writer
}
type Offcolor struct {
	Offset  uint8
	Color   string
	Opacity float64
}
type Filterspec struct {
	In, In2, Result string
}
const (
	svgtop = `<?xml version="1.0"?>
<!-- Generated by SVGo -->
<svg`
	svginitfmt = `%s width="%d%s" height="%d%s"`
	svgns      = `
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">`
	vbfmt = `viewBox="%d %d %d %d"`
	emptyclose = "/>\n"
)
func New(w io.Writer) *SVG { return &SVG{w} }
func (svg *SVG) print(a ...interface{}) (n int, errno error) {
	return fmt.Fprint(svg.Writer, a...)
}
func (svg *SVG) println(a ...interface{}) (n int, errno error) {
	return fmt.Fprintln(svg.Writer, a...)
}
func (svg *SVG) printf(format string, a ...interface{}) (n int, errno error) {
	return fmt.Fprintf(svg.Writer, format, a...)
}
func (svg *SVG) genattr(ns []string) {
	for _, v := range ns {
		svg.printf("\n     %s", v)
	}
	svg.println(svgns)
}
func (svg *SVG) Start(w int, h int, ns ...string) {
	svg.printf(svginitfmt, svgtop, w, "", h, "")
	svg.genattr(ns)
}
func (svg *SVG) Startunit(w int, h int, unit string, ns ...string) {
	svg.printf(svginitfmt, svgtop, w, unit, h, unit)
	svg.genattr(ns)
}
func (svg *SVG) Startpercent(w int, h int, ns ...string) {
	svg.printf(svginitfmt, svgtop, w, "%", h, "%")
	svg.genattr(ns)
}
func (svg *SVG) Startview(w, h, minx, miny, vw, vh int) {
	svg.Start(w, h, fmt.Sprintf(vbfmt, minx, miny, vw, vh))
}
func (svg *SVG) StartviewUnit(w, h int, unit string, minx, miny, vw, vh int) {
	svg.Startunit(w, h, unit, fmt.Sprintf(vbfmt, minx, miny, vw, vh))
}
func (svg *SVG) Startraw(ns ...string) {
	svg.printf(svgtop)
	svg.genattr(ns)
}
func (svg *SVG) End() { svg.println("</svg>") }
func (svg *SVG) linkembed(tag string, scriptype string, data ...string) {
	svg.printf(`<%s type="%s"`, tag, scriptype)
	switch {
	case len(data) == 1 && islink(data[0]):
		svg.printf(" %s/>\n", href(data[0]))
	case len(data) > 0:
		svg.printf(">\n<![CDATA[\n")
		for _, v := range data {
			svg.println(v)
		}
		svg.printf("]]>\n</%s>\n", tag)
	default:
		svg.println(`/>`)
	}
}
func (svg *SVG) Script(scriptype string, data ...string) {
	svg.linkembed("script", scriptype, data...)
}
func (svg *SVG) Style(scriptype string, data ...string) {
	svg.linkembed("style", scriptype, data...)
}
func (svg *SVG) Gstyle(s string) { svg.println(group("style", s)) }
func (svg *SVG) Gtransform(s string) { svg.println(group("transform", s)) }
func (svg *SVG) Translate(x, y int) { svg.Gtransform(translate(x, y)) }
func (svg *SVG) Scale(n float64) { svg.Gtransform(scale(n)) }
func (svg *SVG) ScaleXY(dx, dy float64) { svg.Gtransform(scaleXY(dx, dy)) }
func (svg *SVG) SkewX(a float64) { svg.Gtransform(skewX(a)) }
func (svg *SVG) SkewY(a float64) { svg.Gtransform(skewY(a)) }
func (svg *SVG) SkewXY(ax, ay float64) { svg.Gtransform(skewX(ax) + " " + skewY(ay)) }
func (svg *SVG) Rotate(r float64) { svg.Gtransform(rotate(r)) }
func (svg *SVG) TranslateRotate(x, y int, r float64) {
	svg.Gtransform(translate(x, y) + " " + rotate(r))
}
func (svg *SVG) RotateTranslate(x, y int, r float64) {
	svg.Gtransform(rotate(r) + " " + translate(x, y))
}
func (svg *SVG) Group(s ...string) { svg.printf("<g %s\n", endstyle(s, `>`)) }
func (svg *SVG) Gid(s string) {
	svg.print(`<g id="`)
	xml.Escape(svg.Writer, []byte(s))
	svg.println(`">`)
}
func (svg *SVG) Gend() { svg.println(`</g>`) }
func (svg *SVG) ClipPath(s ...string) { svg.printf(`<clipPath %s`, endstyle(s, `>`)) }
func (svg *SVG) ClipEnd() {
	svg.println(`</clipPath>`)
}
func (svg *SVG) Def() { svg.println(`<defs>`) }
func (svg *SVG) DefEnd() { svg.println(`</defs>`) }
func (svg *SVG) Marker(id string, x, y, width, height int, s ...string) {
	svg.printf(`<marker id="%s" refX="%d" refY="%d" markerWidth="%d" markerHeight="%d" %s`,
		id, x, y, width, height, endstyle(s, ">\n"))
}
func (svg *SVG) MarkerEnd() { svg.println(`</marker>`) }
func (svg *SVG) Pattern(id string, x, y, width, height int, putype string, s ...string) {
	puattr := "userSpaceOnUse"
	if putype != "user" {
		puattr = "objectBoundingBox"
	}
	svg.printf(`<pattern id="%s" x="%d" y="%d" width="%d" height="%d" patternUnits="%s" %s`,
		id, x, y, width, height, puattr, endstyle(s, ">\n"))
}
func (svg *SVG) PatternEnd() { svg.println(`</pattern>`) }
func (svg *SVG) Desc(s string) { svg.tt("desc", s) }
func (svg *SVG) Title(s string) { svg.tt("title", s) }