Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to join edges of 2 SVG lines?

How to merge / join 2 SVG lines whose edges are intersecting ?

SVG EXAMPLE

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If you set the stroke-linecap to stroke-linecap="square" they will join/overlap.

<svg xmlns="http//www.w3.org/2000/svg" viewBox="0 0 10 10" width="300"
stroke="black" stroke-width="1" stroke-linecap="square">
  <line x1="2" y1="2" x2="8" y2="2"  />
  <line x1="8" y1="2" x2="8" y2="8" />
</svg>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading