summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/canvas.rs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src/widget/canvas.rs')
-rw-r--r--graphics/src/widget/canvas.rs21
1 files changed, 11 insertions, 10 deletions
diff --git a/graphics/src/widget/canvas.rs b/graphics/src/widget/canvas.rs
index 65d7e37e..6c526e35 100644
--- a/graphics/src/widget/canvas.rs
+++ b/graphics/src/widget/canvas.rs
@@ -6,14 +6,6 @@
use crate::renderer::{self, Renderer};
use crate::{Backend, Primitive};
-use iced_native::layout;
-use iced_native::mouse;
-use iced_native::{
- Clipboard, Element, Layout, Length, Point, Rectangle, Shell, Size, Vector,
- Widget,
-};
-use std::marker::PhantomData;
-
pub mod event;
pub mod path;
@@ -37,6 +29,15 @@ pub use program::Program;
pub use stroke::{LineCap, LineDash, LineJoin, Stroke};
pub use text::Text;
+use iced_native::layout;
+use iced_native::mouse;
+use iced_native::{
+ Clipboard, Element, Layout, Length, Point, Rectangle, Shell, Size, Vector,
+ Widget,
+};
+
+use std::marker::PhantomData;
+
/// A widget capable of drawing 2D graphics.
///
/// # Examples
@@ -97,7 +98,7 @@ pub struct Canvas<Message, P: Program<Message>> {
width: Length,
height: Length,
program: P,
- phantom: PhantomData<Message>,
+ message_: PhantomData<Message>,
}
impl<Message, P: Program<Message>> Canvas<Message, P> {
@@ -109,7 +110,7 @@ impl<Message, P: Program<Message>> Canvas<Message, P> {
width: Length::Units(Self::DEFAULT_SIZE),
height: Length::Units(Self::DEFAULT_SIZE),
program,
- phantom: PhantomData,
+ message_: PhantomData,
}
}