Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

276
Visualizações
SVG path intersections respecting stroke width and stroke fill

I recently asked another question about SVG intersection here, to which I got some good answers. But I am now looking for a method to find if two paths intersect that respects stroke fill, and stroke size.

In my example, I am making an application for handwriting. I have an erase tool that can change its stroke width.

example 1: The red line in this photo represents the eraser, and the black line represents a stroke i want to erase. using the path intersection library and the methods from here (line intersects with absolute path) the intersection is not detected. Is there an easy way to do this?

example 2: I have a scissor tool in my application. The highlighted blue area intersects with the inner path because the fill overlaps with it. How do I determine if this type of event occurs? For another example, I also consider the below an intersection: example 3

My example code is very simple. I just have an SVG element with N paths inside of it. I want to have a script such that I can loop through all the paths and determine if any 2 intersect. If possible, I want to attach an event listener to each path to determine when it intersects with another. Is there an easy algorithm or solution for this?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda