use svg::node::element::path::{Data, Parameters};
pub use crate::svg_common::*;
impl<K> LinePlotter<K> for Data
where K: Into<Parameters> {
fn new() -> Self {
Data::new()
}
fn move_to(self, x: K, y: K) -> Self {
self.move_to((x, y))
}
fn line_to(self, x: K, y: K) -> Self {
self.line_to((x, y))
}
fn close(self) -> Self {
self.close()
}
}
impl<K> ArcPlotter<K> for Data
where K: Into<Parameters> {
fn arc_to(self, rx: K, ry: K, rot: K, large_arc: bool, sweep_clockwise: bool, x: K, y: K) -> Self {
let large_arc = large_arc as u8;
let sweep_clockwise = sweep_clockwise as u8;
self.elliptical_arc_to((rx, ry, rot, large_arc, sweep_clockwise, x, y))
}
}