ZVON > References > Zvon Example Repository
Example repository: index | categories | search

All > SVG > Shapes > Drawing a polygon

A polygon can be drawn using the polygon element. Stroke color can be set using the stroke attribute. The width of the line is set using the stroke-width.


Output
Output - picture
SVG version


Source
<svg width="150" height="150" xmlns="http://www.w3.org/2000/svg" >
     <polygon points="10,10 50,50 100,10" stroke="red" stroke-width="2"/>
</svg>