diff options
author | 2020-10-29 02:00:56 +0100 | |
---|---|---|
committer | 2020-10-29 02:00:56 +0100 | |
commit | b40775fb7414b44307e343921ef015c65a916dab (patch) | |
tree | 06a3fad05b14d3b0f97687bf410fa8bbc04c9526 /examples/geometry | |
parent | 8a3ce90959e281cd73a7486d800df8d65478a698 (diff) | |
parent | 91b1886968b498b913984bdfa4bee840e8821ec6 (diff) | |
download | iced-b40775fb7414b44307e343921ef015c65a916dab.tar.gz iced-b40775fb7414b44307e343921ef015c65a916dab.tar.bz2 iced-b40775fb7414b44307e343921ef015c65a916dab.zip |
Merge pull request #584 from hecrj/improvement/viewport-aware-drawing
Viewport aware drawing
Diffstat (limited to 'examples/geometry')
-rw-r--r-- | examples/geometry/src/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/geometry/src/main.rs b/examples/geometry/src/main.rs index 1c13c8d5..f650b2c1 100644 --- a/examples/geometry/src/main.rs +++ b/examples/geometry/src/main.rs @@ -15,8 +15,8 @@ mod rainbow { Backend, Defaults, Primitive, Renderer, }; use iced_native::{ - layout, mouse, Element, Hasher, Layout, Length, Point, Size, Vector, - Widget, + layout, mouse, Element, Hasher, Layout, Length, Point, Rectangle, Size, + Vector, Widget, }; pub struct Rainbow; @@ -57,6 +57,7 @@ mod rainbow { _defaults: &Defaults, layout: Layout<'_>, cursor_position: Point, + _viewport: &Rectangle, ) -> (Primitive, mouse::Interaction) { let b = layout.bounds(); |