diff options
Diffstat (limited to 'graphics/src/widget/canvas.rs')
-rw-r--r-- | graphics/src/widget/canvas.rs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/graphics/src/widget/canvas.rs b/graphics/src/widget/canvas.rs index b4afd998..b9ccb721 100644 --- a/graphics/src/widget/canvas.rs +++ b/graphics/src/widget/canvas.rs @@ -9,11 +9,11 @@ pub mod path; mod cache; mod cursor; -mod fill; -mod frame; +pub mod fill; +pub(crate) mod frame; mod geometry; mod program; -mod stroke; +pub mod stroke; mod text; pub use cache::Cache; @@ -27,6 +27,7 @@ pub use program::Program; pub use stroke::{LineCap, LineDash, LineJoin, Stroke}; pub use text::Text; +pub use crate::gradient::{self, Gradient}; use crate::{Backend, Primitive, Renderer}; use iced_native::layout::{self, Layout}; @@ -45,16 +46,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, |