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

All > SVG > Shapes > Drawing a straight line

A straight line can be drawn using the line 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="100" height="100" xmlns="http://www.w3.org/2000/svg" >
     <line x1="0" y1="0" x2="50" y2="100" stroke="red" stroke-width="2"/>
</svg>