Introduce viewport to Widget::draw
This should eventually allow us to only generate primitives that are visible.
This commit is contained in:
parent
8a3ce90959
commit
d328b07b39
31 changed files with 123 additions and 35 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use crate::{Color, Layout, Point, Renderer, Widget};
|
||||
use crate::{Color, Layout, Point, Rectangle, Renderer, Widget};
|
||||
|
||||
/// A renderer able to graphically explain a [`Layout`].
|
||||
///
|
||||
|
|
@ -21,6 +21,7 @@ pub trait Debugger: Renderer {
|
|||
widget: &dyn Widget<Message, Self>,
|
||||
layout: Layout<'_>,
|
||||
cursor_position: Point,
|
||||
viewport: &Rectangle,
|
||||
color: Color,
|
||||
) -> Self::Output;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue