diff options
author | 2022-10-05 10:49:58 -0700 | |
---|---|---|
committer | 2022-10-05 10:49:58 -0700 | |
commit | 30432cbade3d9b25c4df62656a7494db3f4ea82a (patch) | |
tree | 186ca59e50caede84ede2e2381dc01dd0483806b /graphics/src/widget/canvas/stroke.rs | |
parent | 6e7b3ced0b1daf368e44e181ecdb4ae529877eb6 (diff) | |
download | iced-30432cbade3d9b25c4df62656a7494db3f4ea82a.tar.gz iced-30432cbade3d9b25c4df62656a7494db3f4ea82a.tar.bz2 iced-30432cbade3d9b25c4df62656a7494db3f4ea82a.zip |
Readjusted namespaces, removed Geometry example as it's no longer relevant.
Diffstat (limited to 'graphics/src/widget/canvas/stroke.rs')
-rw-r--r-- | graphics/src/widget/canvas/stroke.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/graphics/src/widget/canvas/stroke.rs b/graphics/src/widget/canvas/stroke.rs index 7ce5ff1d..a19937ea 100644 --- a/graphics/src/widget/canvas/stroke.rs +++ b/graphics/src/widget/canvas/stroke.rs @@ -1,6 +1,8 @@ +//! Create lines from a [crate::widget::canvas::Path] and render with various attributes/styles. + use iced_native::Color; use crate::gradient::Gradient; -use crate::shader::Shader; +use crate::layer::mesh; /// The style of a stroke. #[derive(Debug, Clone)] @@ -66,10 +68,10 @@ pub enum Style<'a> { Gradient(&'a Gradient), } -impl <'a> Into<Shader> for Style<'a> { - fn into(self) -> Shader { +impl <'a> Into<mesh::Style> for Style<'a> { + fn into(self) -> mesh::Style { match self { - Style::Solid(color) => Shader::Solid(color), + Style::Solid(color) => mesh::Style::Solid(color), Style::Gradient(gradient) => gradient.clone().into() } } |