graphics_style/traits/
convert.rs1use super::*;
2
3impl From<&RectangleStyle> for PolygonStyle {
4 fn from(style: &RectangleStyle) -> Self {
5 Self { fill: style.fill.clone(), edge: style.edge.clone() }
6 }
7}
8
9impl From<CircleStyle> for EllipseStyle {
10 fn from(style: CircleStyle) -> Self {
11 Self { fill: style.fill, edge: style.edge }
12 }
13}
14
15impl From<&EllipseStyle> for PolygonStyle {
16 fn from(style: &EllipseStyle) -> Self {
17 Self { fill: style.fill.clone(), edge: style.edge.clone() }
18 }
19}