shape_svg/renderer_2d/mod.rs
1mod ellipse_like;
2mod line_like;
3mod point_like;
4mod polygon_like;
5use shape_core::{Circle, Ellipse, Parallelogram, Point, Polygon, Polyline, Rectangle, RegularPolygon, Square, Triangle};
6use std::fmt::Display;
7use svg::node::Value;
8use std::ops::Sub;
9/// Mark a type that can be convert to svg
10pub trait ToSVG {
11 /// The svg element type
12 type Element;
13 /// Convert to svg by reference
14 fn to_svg(&self) -> Self::Element;
15}