diff options
Diffstat (limited to 'src/style/shape.rs')
-rw-r--r-- | src/style/shape.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/style/shape.rs b/src/style/shape.rs index 4a56a1d..a829f3f 100644 --- a/src/style/shape.rs +++ b/src/style/shape.rs @@ -1,4 +1,5 @@ use super::color::{Color, RGBAColor}; +use plotters_backend::{BackendColor, BackendStyle}; /// Style for any of shape #[derive(Clone)] @@ -36,3 +37,12 @@ impl<'a, T: Color> From<&'a T> for ShapeStyle { } } } + +impl BackendStyle for ShapeStyle { + fn color(&self) -> BackendColor { + self.color.color() + } + fn stroke_width(&self) -> u32 { + self.stroke_width + } +} |