A low-level package for working with svg path strings
This package has two use cases
It is meant as a foundation: there is little type safety and convenience. It's just a literal translation of the SVG spec into elm data types.
Given some attributes and a list of subpaths, create an Svg path element.
The subpaths will be converted to a string and added as the d attribute on the element
A subpath is a MoveTo followed by a list of DrawTos
The mode of an instruction
MoveTo instructions move the cursor, but don't draw anything.
Constructors for DrawTo instructions
Represent a point in 2D space with a tuple of floats
Determine which arc to draw
Determine which arc to draw
The arguments for an Arc
Turn the flags into numbers
case arcFlag of
LargestArc -> 1
SmallestArc -> 0
case direction of
Clockwise -> 0
CounterClockwise -> 1Try to decode two ints into flag values. Inverse of encodeFlags.
Convert a list of subpaths to svg path syntax