svg

package
v1.16.3-0...-543e744 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicSegmentType

type BasicSegmentType struct {
	Cmd byte // See http://www.w3.org/TR/SVG/paths.html for path command structure
	Arg [6]float64
}

BasicSegmentType describes a single curve or position segment

type BasicType

type BasicType struct {
	Wd, Ht   float64
	Segments [][]BasicSegmentType
}

BasicType aggregates the information needed to describe a multi-segment basic SVG image.

func BasicFileParse

func BasicFileParse(svgFileStr string) (sig BasicType, err error)

BasicFileParse parses a simple scalable vector graphics (SVG) file into a basic descriptor.

func BasicParse

func BasicParse(buf []byte) (sig BasicType, err error)

BasicParse parses a simple scalable vector graphics (SVG) buffer into a descriptor. Only a small subset of the SVG standard, in particular the path information generated by jSignature, is supported. The returned path data includes only the commands 'M' (absolute moveto: x, y), 'L' (absolute lineto: x, y), 'C' (absolute cubic Bézier curve: cx0, cy0, cx1, cy1, x1,y1), 'Q' (absolute quadratic Bézier curve: x0, y0, x1, y1) and 'Z' (closepath).

Jump to

Keyboard shortcuts

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