meerk40t / svgelements

SVG Parsing for Elements, Paths, and other SVG Objects.
MIT License
133 stars 29 forks source link

svgelement does not implement Marker #78

Open tatarize opened 3 years ago

tatarize commented 3 years ago

https://www.w3.org/TR/SVG/painting.html#MarkerElement

The ‘marker’ element defines the graphics that are to be used for drawing markers on a shape.

In addition to adding these elements into the dom for the marked shapes. This change would requirement directional positions for path. Strictly speaking the markers on shapes where elements are turned into path equivalents is at risk within the svg 2.0 spec. However the particular nodes within paths are easily determined and markers would returned for these positions, with regard to the rules for markers.

An addition would be required to determine the current direction of the path, ignoring zero length objects. Some markers require that the marker be placed in the direction of the current directionality of the path. This would require svg element paths to be able to calculate those. This functionality exists within svgpathtools