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
use crate::geometry::{Point, Transform, Transformation};
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OutlinePoint {
pub is_on_curve: bool,
pub point: Point,
}
impl Transform for OutlinePoint {
fn transform<T>(self, t: &T) -> OutlinePoint
where
T: Transformation,
{
OutlinePoint {
is_on_curve: self.is_on_curve,
point: self.point.transform(t),
}
}
fn transform_mut<T>(&mut self, t: &T)
where
T: Transformation,
{
*self = self.transform(t)
}
}