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
use super::*;
impl<T> AddAssign<T> for FillStyle
where
T: Into<FillStyle>,
{
fn add_assign(&mut self, rhs: T) {
*self = rhs.into();
}
}
impl From<&Color> for FillStyle {
#[inline(always)]
fn from(c: &Color) -> Self {
Self { texture: Texture::Color(*c) }
}
}
impl From<Color> for FillStyle {
#[inline(always)]
fn from(c: Color) -> Self {
Self { texture: Texture::Color(c) }
}
}
impl From<&Self> for FillStyle {
fn from(v: &Self) -> Self {
v.clone()
}
}