Closed Anubhavshakya closed 2 years ago
That is an interesting use case, I wasn't aware that you can represent "multiple" strokes within a single Path
. I'm debating on:
PathDataType
d
attribute of Path
I'll try implementing the first one, and if there are some problems, I'll look at the second option
I am unsure if this should be implemented actually, since if the strokes have an opacity lower than 1, then the resulting drawing is different.
Current behaviour:
What this change would bring:
I have implemented it in the feat-combine-paths
branch, I will try to figure out a way so that this library supports both ways of drawing - if I can't, I won't add this to the library. The default will not combine paths, but I'll add a prop to make it so that it is doable
getSvg() function returns multiple path with d attrtibute. @BenJeau Is there any functionality to make only one path with d attribute ?? example Right Now
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path d="M39,176c0,-21 11,-40 19,-59c8,-20 18,-39 27,-59c3,-7 20,-56 24,-42c8,26 11,51 16,77c3,15 15,45 15,63" stroke="#457429" stroke-width="3" opacity="1" stroke-linecap="round" stroke-linejoin="round" fill="none"/><path d="M67,91c-1,2 4,3 7,3c17,3 33,4 50,4" stroke="#457429" stroke-width="3" opacity="1" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>
Expected
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path d="M39,176c0,-21 11,-40 19,-59c8,-20 18,-39 27,-59c3,-7 20,-56 24,-42c8,26 11,51 16,77c3,15 15,45 15,63 M67,91c-1,2 4,3 7,3c17,3 33,4 50,4" stroke="#457429" stroke-width="3" opacity="1" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>