1use crate::{Angle, Point, Transform};
2
3mod apply;
4mod canvas;
5mod extend;
6mod geometry;
7mod relative;
8mod svg;
9
10pub use apply::{PathAppliable, PathApply};
11pub use canvas::PathCanvas;
12pub use extend::PathExtend;
13pub use geometry::PathGeometry;
14pub use relative::PathRelative;
15pub use svg::PathSvg;
16
17pub trait PathCore {
19 fn current(&self) -> Point;
21
22 #[inline(always)]
24 fn move_to(&mut self, to: impl Into<Point>) -> &mut Self {
25 self.move_to_impl(to.into())
26 }
27 fn move_to_impl(&mut self, to: Point) -> &mut Self;
28
29 #[inline(always)]
31 fn line_to(&mut self, to: impl Into<Point>) -> &mut Self {
32 self.line_to_impl(to.into())
33 }
34 fn line_to_impl(&mut self, to: Point) -> &mut Self;
35
36 #[inline(always)]
38 fn quadratic_to(&mut self, c1: impl Into<Point>, to: impl Into<Point>) -> &mut Self {
39 self.quadratic_to_impl(c1.into(), to.into())
40 }
41 fn quadratic_to_impl(&mut self, c1: Point, to: Point) -> &mut Self;
42
43 #[inline(always)]
45 fn cubic_to(&mut self, c1: impl Into<Point>, c2: impl Into<Point>, to: impl Into<Point>) -> &mut Self {
46 self.cubic_to_impl(c1.into(), c2.into(), to.into())
47 }
48 fn cubic_to_impl(&mut self, c1: Point, c2: Point, to: Point) -> &mut Self;
49
50 fn close(&mut self) -> &mut Self;
52}