stathissideris / dali

dali is a Clojure library for representing, exporting and manipulating the SVG graphics format.
291 stars 16 forks source link

Path continuations #27

Open timothypratley opened 11 months ago

timothypratley commented 11 months ago

Hi. Thank you for making Dali, I like it!

It seems that paths do not yet support "continuations" for example:

[:path :M [0 0] :L [0 -90] [0 0] [-86 -28] [0 0] [-53 73] [0 0] [53 73] [0 0] [86 -28]]
=>
<path d="M 0 0 L 0 -90"></path>

Whereas it should have produced

"M 0,0 L0,-90 0,0 -86,-28 0,0 -53,73 0,0 53,73 0,0 86,-28"

Which is a valid (and slightly more convenient) way to construct paths.

A number of coordinates pairs may be specified to draw a polyline. At the end of the command, the new current point is set to the final set of coordinates provided.

The same is true of curves as well.