shape_svg/renderer_2d/
line_like.rs

1use super::*;
2use shape_core::Line;
3
4impl<T> ToSVG for Line<T>
5where
6    T: Display,
7{
8    type Element = svg::node::element::Line;
9
10    fn to_svg(&self) -> Self::Element {
11        svg::node::element::Line::new()
12            .set("x1", self.s.x.to_string())
13            .set("y1", self.s.y.to_string())
14            .set("x2", self.e.x.to_string())
15            .set("y2", self.e.y.to_string())
16    }
17}