+ 10
Haw can I draw a line at 45° angle using <path> tag.
3 Antworten
+ 2
A very quick example with a line facing 45deg down:
<svg>
<path d="M 0 0 L 100 100" stroke="red" stroke-width="3" fill="none" />
</svg>
+ 4
Veliside could you explain
+ 3
M 0 0 is the starting point, at 0,0 pixels of the screen
L 100 100 is a line that ends at 100,100 pixels away from the starting point
So we have a diagonal line of a square, which has an angle of 45deg.