graphics_style/shapes/fill/
mod.rs

1use super::*;
2
3impl<T> AddAssign<T> for FillStyle
4where
5    T: Into<FillStyle>,
6{
7    fn add_assign(&mut self, rhs: T) {
8        *self = rhs.into();
9    }
10}
11
12impl From<&Color> for FillStyle {
13    #[inline(always)]
14    fn from(c: &Color) -> Self {
15        Self { texture: Texture::Color(*c) }
16    }
17}
18
19impl From<Color> for FillStyle {
20    #[inline(always)]
21    fn from(c: Color) -> Self {
22        Self { texture: Texture::Color(c) }
23    }
24}
25
26impl From<&Self> for FillStyle {
27    fn from(v: &Self) -> Self {
28        v.clone()
29    }
30}