From d328b07b3937c968fc8139f0b5c61903ebb893e7 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 18 Aug 2020 03:37:32 +0200 Subject: Introduce `viewport` to `Widget::draw` This should eventually allow us to only generate primitives that are visible. --- native/src/widget.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'native/src/widget.rs') diff --git a/native/src/widget.rs b/native/src/widget.rs index a10281df..8687ce6f 100644 --- a/native/src/widget.rs +++ b/native/src/widget.rs @@ -73,7 +73,9 @@ pub use text::Text; #[doc(no_inline)] pub use text_input::TextInput; -use crate::{layout, overlay, Clipboard, Event, Hasher, Layout, Length, Point}; +use crate::{ + layout, overlay, Clipboard, Event, Hasher, Layout, Length, Point, Rectangle, +}; /// A component that displays information and allows interaction. /// @@ -137,6 +139,7 @@ where defaults: &Renderer::Defaults, layout: Layout<'_>, cursor_position: Point, + viewport: &Rectangle, ) -> Renderer::Output; /// Computes the _layout_ hash of the [`Widget`]. -- cgit