summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/canvas.rs
diff options
context:
space:
mode:
authorLibravatar shan <shankern@protonmail.com>2022-09-30 10:27:00 -0700
committerLibravatar shan <shankern@protonmail.com>2022-09-30 10:27:00 -0700
commit5d0fffc626928177239336757507b986b081b878 (patch)
tree03c6d1c8ab957f3cb5115fe6c75df65110a0ad64 /graphics/src/widget/canvas.rs
parente25f3d3dea2d2c1ba7d2778948443df2745084be (diff)
downloadiced-5d0fffc626928177239336757507b986b081b878.tar.gz
iced-5d0fffc626928177239336757507b986b081b878.tar.bz2
iced-5d0fffc626928177239336757507b986b081b878.zip
Fixed some importing issues since you can use a Shader::Gradient outside a Canvas widget, where it was previously only accessible.
Diffstat (limited to '')
-rw-r--r--graphics/src/widget/canvas.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/graphics/src/widget/canvas.rs b/graphics/src/widget/canvas.rs
index 09aad98d..95c962af 100644
--- a/graphics/src/widget/canvas.rs
+++ b/graphics/src/widget/canvas.rs
@@ -5,7 +5,6 @@
//! and more!
pub mod event;
-pub mod gradient;
pub mod path;
mod cache;
@@ -23,7 +22,6 @@ pub use event::Event;
pub use fill::{Fill, FillRule, FillStyle};
pub use frame::Frame;
pub use geometry::Geometry;
-pub use gradient::Gradient;
pub use path::Path;
pub use program::Program;
pub use stroke::{LineCap, LineDash, LineJoin, Stroke, StrokeStyle};
@@ -47,16 +45,12 @@ use std::marker::PhantomData;
/// If you want to get a quick overview, here's how we can draw a simple circle:
///
/// ```no_run
-/// # mod iced {
-/// # pub mod widget {
-/// # pub use iced_graphics::widget::canvas;
-/// # }
-/// # pub use iced_native::{Color, Rectangle, Theme};
-/// # }
-/// use iced::widget::canvas::{self, Canvas, Cursor, Fill, Frame, Geometry, Path, Program};
-/// use iced::{Color, Rectangle, Theme};
-///
/// // First, we define the data we need for drawing
+/// use iced_graphics::{Color, Rectangle};
+/// use iced_graphics::widget::Canvas;
+/// use iced_graphics::widget::canvas::{Cursor, Frame, Geometry, Path, Program};
+/// use iced_style::Theme;
+///
/// #[derive(Debug)]
/// struct Circle {
/// radius: f32,