svg

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSpacing = 10

Variables

This section is empty.

Functions

This section is empty.

Types

type Canvas

type Canvas struct {
	*svg.SVG
	Board  MinMax
	Region MinMax
}

func (*Canvas) Comment

func (canvas *Canvas) Comment(s string) *Canvas

func (*Canvas) Commentf

func (canvas *Canvas) Commentf(format string, a ...interface{}) *Canvas

func (*Canvas) DrawGeometry

func (canvas *Canvas) DrawGeometry(geo tegola.Geometry, id string, style string, pointStyle string, drawPoints bool) int

func (*Canvas) DrawGrid

func (canvas *Canvas) DrawGrid(n int, label bool, style string)

func (*Canvas) DrawLine

func (canvas *Canvas) DrawLine(l tegola.LineString, id string, style string, pointStyle string, drawPoints bool)

func (*Canvas) DrawMathPoints added in v0.6.0

func (canvas *Canvas) DrawMathPoints(pts []maths.Pt, s ...string)

func (*Canvas) DrawMathSegments added in v0.6.0

func (canvas *Canvas) DrawMathSegments(ls []maths.Line, s ...string)

func (*Canvas) DrawMultiLine

func (canvas *Canvas) DrawMultiLine(ml tegola.MultiLine, id string, style string, pointStyle string, drawPoints bool)

func (*Canvas) DrawMultiPolygon

func (canvas *Canvas) DrawMultiPolygon(mp tegola.MultiPolygon, id string, style string, pointStyle string, drawPoints bool) int

func (*Canvas) DrawPoint

func (canvas *Canvas) DrawPoint(x, y int, fill string)

func (*Canvas) DrawPolygon

func (canvas *Canvas) DrawPolygon(p tegola.Polygon, id string, style string, pointStyle string, drawPoints bool) int

func (*Canvas) DrawRegion

func (canvas *Canvas) DrawRegion(withGrid bool)

func (*Canvas) GroupFn

func (canvas *Canvas) GroupFn(attr []string, fn func(c *Canvas))

func (*Canvas) Init

func (canvas *Canvas) Init(writer io.Writer, w, h int, grid bool) *Canvas

type MinMax

type MinMax struct {
	MinX, MinY, MaxX, MaxY int64
}

func (*MinMax) ExpandBy

func (mm *MinMax) ExpandBy(n int64) *MinMax

func (*MinMax) Fn

func (mm *MinMax) Fn() *MinMax

func (MinMax) Height

func (mm MinMax) Height() int64

func (*MinMax) IsZero

func (mm *MinMax) IsZero() bool

func (MinMax) Max

func (mm MinMax) Max() (int64, int64)

func (MinMax) Min

func (mm MinMax) Min() (int64, int64)

func (*MinMax) MinMax

func (mm *MinMax) MinMax(m1 *MinMax) *MinMax

func (*MinMax) MinMaxFn

func (mm *MinMax) MinMaxFn(fn func() *MinMax) *MinMax

func (*MinMax) MinMaxPt

func (mm *MinMax) MinMaxPt(x, y int64) *MinMax

func (*MinMax) OfGeometry

func (mm *MinMax) OfGeometry(gs ...tegola.Geometry) *MinMax

func (MinMax) SentinalPts

func (mm MinMax) SentinalPts() [][]int64

func (*MinMax) String

func (mm *MinMax) String() string

func (MinMax) Width

func (mm MinMax) Width() int64

Jump to

Keyboard shortcuts

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