SVG rounded corner

前端 未结 12 2017
谎友^
谎友^ 2020-11-28 22:21

I have the following SVG:



        
12条回答
  •  有刺的猬
    2020-11-28 23:05

    As referenced in my answer to Applying rounded corners to paths/polygons, I have written a routine in javascript for generically rounding corners of SVG paths, with examples, here: http://plnkr.co/edit/kGnGGyoOCKil02k04snu.

    It will work independently from any stroke effects you may have. To use, include the rounding.js file from the Plnkr and call the function like so:

    roundPathCorners(pathString, radius, useFractionalRadius)
    

    The result will be the rounded path.

    The results look like this:

    SVG Path Rounding Examples

提交回复
热议问题