diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-07-02 19:59:52 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-07-02 20:07:43 +0200 |
| commit | ebfdb1dafa430786db10dad2ef7d5467c1bdbed1 (patch) | |
| tree | 2bbc24ddb4124c4bb14dec0e536129d4de37b056 /src/geom/paint.rs | |
| parent | 3ab19185093d7709f824b95b979060ce125389d8 (diff) | |
Move everything into `crates/` directory
Diffstat (limited to 'src/geom/paint.rs')
| -rw-r--r-- | src/geom/paint.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/geom/paint.rs b/src/geom/paint.rs deleted file mode 100644 index 10fa9fde..00000000 --- a/src/geom/paint.rs +++ /dev/null @@ -1,30 +0,0 @@ -use super::*; - -/// How a fill or stroke should be painted. -#[derive(Clone, Eq, PartialEq, Hash)] -pub enum Paint { - /// A solid color. - Solid(Color), -} - -impl<T: Into<Color>> From<T> for Paint { - fn from(t: T) -> Self { - Self::Solid(t.into()) - } -} - -impl Debug for Paint { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { - match self { - Self::Solid(color) => color.fmt(f), - } - } -} - -cast! { - Paint, - self => match self { - Self::Solid(color) => Value::Color(color), - }, - color: Color => Self::Solid(color), -} |
