Reputation: 35577
I'm trying to create a simple svg path in the shape of a triangle with rounded corners.
I've started from this triangle:
<svg width="440" height="440">
<path d="M5,100 L70,5 L135,100 z" fill="none" stroke="black" stroke-width="3" />
</svg>
But I'm struggling to add in the corners - this is as far as I've got:
<svg width="440" height="440">
<path d="M5,100 a10,10 1 0 1 -5,-10 L70,5 L135,90 a10,10 1 0 1 5,10 z" fill="none" stroke="black" stroke-width="3" />
</svg>
What is the correct path coordinates to create the triangle with three smooth corners? Do I need to do some geometry to calculate the correct strart and end points or is there a tool I can use to configure the shape which will give me the coordinates the shape is made up of?
Upvotes: 6
Views: 8138
Reputation: 21836
Inkscape has an option to convert the stroke of a path to a filled object. With that you can:
stroke-linejoin:round
(Fill and Stroke dialog -> Stroke style -> Round join).Set to node selection mode. Now you can remove all nodes on the inner side.
Upvotes: 6