diff --git a/go.mod b/go.mod index c725841..5b02cc2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/ajstarks/svgo +module github.com/guigui64/svgo go 1.15 diff --git a/svg.go b/svg.go index 03af677..3f605c7 100644 --- a/svg.go +++ b/svg.go @@ -403,6 +403,13 @@ func (svg *SVG) Image(x int, y int, w int, h int, link string, s ...string) { svg.printf(``) } +// Text places the specified text, t at x,y according to the style specified in s +// Standard Reference: http://www.w3.org/TR/SVG11/text.html#TextElement +func (svg *SVG) TextD(x int, y int, dx, dy string, t string, s ...string) { + svg.printf(`")) + xml.Escape(svg.Writer, []byte(t)) + svg.println(``) +} + // Textspan begins text, assuming a tspan will be included, end with TextEnd() // Standard Reference: https://www.w3.org/TR/SVG11/text.html#TSpanElement func (svg *SVG) Textspan(x int, y int, t string, s ...string) { @@ -1032,6 +1047,9 @@ func ptag(x int, y int) string { return fmt.Sprintf(`