Closed nathanleclaire closed 5 years ago
you can place a title with a group, or alternatively add a title attribute to an element.
package main
import (
"os"
svg "github.com/ajstarks/svgo"
)
func main() {
canvas := svg.New(os.Stdout)
canvas.Start(500, 500)
canvas.Group()
canvas.Title("this is the title")
canvas.Circle(100, 100, 10)
canvas.Gend()
canvas.Rect(200, 200, 50, 40, `title="box"`)
canvas.End()
}
Creating a group worked perfectly. STOKED!
Title
seems like it will work fine for the whole canvas but for individual elements - seems it won't work based on reading the source. Is there any approach to take here?