D
D
Dmitry Lokshin2017-04-09 18:49:07
JavaScript
Dmitry Lokshin, 2017-04-09 18:49:07

How to merge several paths into one in svg?

Hello dear developers.
In the process of work, it became necessary to combine several paths into one. It is to merge, not group (g, use, etc.), for example:

<path d="m 648.6,575 c -0.5,0 -0.9,-0.4 -1,-0.9 -0.1 z" />
<path d="m 648.6,575 c -0.5,0 -0.71,-1.4 -1,-3.9 -0.4 z" />
<path d="m 548.4,575 c -1.5,0 -4.71,-1.4 -1,-3.9 -1.1 z" />

and it should turn out:
<path d="m 648.6,575 c -0.5,0 -0.9,-0.4 -1,-0.9 -0.1 648.6,575 c -0.5,0 -0.71,-1.4 -1,-3.9 -0.4 548.4,575 c -1.5,0 -4.71,-1.4 -1,-3.9 -1.1 z" />

Such a task arose when creating animation, because. when using multiple paths, the figure is drawn ugly than when using a single path.
I apologize if the question is stupid, because. I am not a designer.
Thank you very much in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay, 2017-04-09
@nickolyashka

<path 
d="m 648.6,575 c -0.5,0 -0.9,-0.4 -1,-0.9 -0.1 z
m 648.6,575 c -0.5,0 -0.71,-1.4 -1,-3.9 -0.4 z
m 548.4,575 c -1.5,0 -4.71,-1.4 -1,-3.9 -1.1 z
"/>

Each M on a new line.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question