MCPcopy
hub / github.com/tdewolff/canvas / MustParseSVGPath

Function MustParseSVGPath

path.go:2075–2081  ·  view source on GitHub ↗

MustParseSVGPath parses an SVG path data string and panics if it fails.

(s string)

Source from the content-addressed store, hash-verified

2073
2074// MustParseSVGPath parses an SVG path data string and panics if it fails.
2075func MustParseSVGPath(s string) *Path {
2076 p, err := ParseSVGPath(s)
2077 if err != nil {
2078 panic(err)
2079 }
2080 return p
2081}
2082
2083// ParseSVGPath parses an SVG path data string.
2084func ParseSVGPath(s string) (*Path, error) {

Callers 15

drawFunction · 0.92
mainFunction · 0.92
TestPDFFunction · 0.92
DrawPreviewWithAssetsFunction · 0.85
TestPolylineFunction · 0.85
TestPolylineSmoothenFunction · 0.85
TestFontDecorationFunction · 0.85
TestPathStrokeFunction · 0.85
TestPathOffsetFunction · 0.85
TestShapesFunction · 0.85
TestRectFunction · 0.85
TestArcToQuadFunction · 0.85

Calls 1

ParseSVGPathFunction · 0.85

Tested by 15

TestPDFFunction · 0.74
TestPolylineFunction · 0.68
TestPolylineSmoothenFunction · 0.68
TestFontDecorationFunction · 0.68
TestPathStrokeFunction · 0.68
TestPathOffsetFunction · 0.68
TestShapesFunction · 0.68
TestRectFunction · 0.68
TestArcToQuadFunction · 0.68
TestArcToCubeFunction · 0.68
TestXMonotoneEllipseFunction · 0.68
TestFlattenEllipseFunction · 0.68