svg

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2015 License: MIT Imports: 2 Imported by: 20

Documentation

Overview

Package svg provide methods to work effortlessly with SVG.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SVG

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

SVG struct, SVG contains elementry attributes like svg string, width, height

func (*SVG) Circle

func (s *SVG) Circle(cx, cy, r interface{}, args map[string]interface{})

Circle adds a circle element to SVG object

func (*SVG) Group

func (s *SVG) Group(elements [2]string, args map[string]interface{})

Group adds a group element to SVG object.

It groups optionally provided elements together.

func (*SVG) Path

func (s *SVG) Path(str string, args map[string]interface{})

Path adds a path element to SVG object

func (*SVG) Polyline

func (s *SVG) Polyline(str string, args map[string]interface{})

Polyline adds a polyline element to SVG object

func (*SVG) Rect

func (s *SVG) Rect(x, y, w, h interface{}, args map[string]interface{})

Rect adds a rectangle element to SVG object

func (*SVG) SetHeight added in v1.4.0

func (s *SVG) SetHeight(h int)

SetHeight sets SVG object's height

func (*SVG) SetWidth added in v1.4.0

func (s *SVG) SetWidth(w int)

SetWidth sets SVG object's width

func (*SVG) Str

func (s *SVG) Str() string

Str returns string representing whole SVG object

func (*SVG) WriteArgs added in v1.4.0

func (s *SVG) WriteArgs(args map[string]interface{}) string

WriteArgs adds additional attributes to a SVG elements.

It parses provides 'map' arguments to add attributes to SVG element.

Jump to

Keyboard shortcuts

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