1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use iced_native::{Point, Vector};
#[derive(Debug, Clone, Copy)]
pub struct Arc {
pub center: Point,
pub radius: f32,
pub start_angle: f32,
pub end_angle: f32,
}
#[derive(Debug, Clone, Copy)]
pub struct Elliptical {
pub center: Point,
pub radii: Vector,
pub rotation: f32,
pub start_angle: f32,
pub end_angle: f32,
}
impl From<Arc> for Elliptical {
fn from(arc: Arc) -> Elliptical {
Elliptical {
center: arc.center,
radii: Vector::new(arc.radius, arc.radius),
rotation: 0.0,
start_angle: arc.start_angle,
end_angle: arc.end_angle,
}
}
}