folkertdev/svg-path-lowlevel/1.0.1

NOTE: this package is not compatible with Elm 0.19.1

Path.LowLevel.Parser

Parse SVG path syntax into an elm value

parse : String -> Result Error (List SubPath)

Parse svg path syntax into a list of subpaths.

parse "m10,20 A25,25 -30 0,1 50,-25" -->
    Ok
        [ { moveto = MoveTo Relative ( 10, 20 )
          , drawtos =
                [ EllipticalArc Absolute
                    { radii = ( 25, 25 )
                    , xAxisRotate = -30
                    , arcFlag = SmallestArc
                    , direction = CounterClockwise
                    , target = ( 50, -25 )
                    }
                ]
          }
        ]