432-Technologies/dessin

Remove trait for dessin-svg

Closed this issue · 0 comments

Currently, an unexpected behaviour can happend with the trait system:

let circle: Style<Circle> = dessin!(Circle: #(
    fill={Color::RED}
    radius={2.}
));

let svg = circle.to_svg();

will produce an emty svg.

Indeed, ToSVG is implemented for Shape, while Style implements Deref. So the to_svg function is call with Circle only, and not Style