svg

package
v0.0.0-...-6d3a538 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Writer

func Writer(w io.Writer, c *canvas.Canvas) error

Writer writes the canvas as a SVG file

Types

type SVG

type SVG struct {
	// contains filtered or unexported fields
}

func New

func New(w io.Writer, width, height float64) *SVG

New creates a scalable vector graphics (SVG) renderer.

func (*SVG) AddClass

func (r *SVG) AddClass(class string)

func (*SVG) Close

func (r *SVG) Close() error

func (*SVG) EmbedFonts

func (r *SVG) EmbedFonts(embedFonts bool)

func (*SVG) RemoveClass

func (r *SVG) RemoveClass(class string)

func (*SVG) RenderImage

func (r *SVG) RenderImage(img image.Image, m canvas.Matrix)

func (*SVG) RenderPath

func (r *SVG) RenderPath(path *canvas.Path, style canvas.Style, m canvas.Matrix)

func (*SVG) RenderText

func (r *SVG) RenderText(text *canvas.Text, m canvas.Matrix)

func (*SVG) SetImageEncoding

func (r *SVG) SetImageEncoding(enc canvas.ImageEncoding)

func (*SVG) Size

func (r *SVG) Size() (float64, float64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL