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
|
|
@ -96,10 +96,11 @@ where
|
|||
widget: &dyn Widget<Message, Self>,
|
||||
layout: Layout<'_>,
|
||||
cursor_position: Point,
|
||||
viewport: &Rectangle,
|
||||
color: Color,
|
||||
) -> Self::Output {
|
||||
let (primitive, cursor) =
|
||||
widget.draw(self, defaults, layout, cursor_position);
|
||||
widget.draw(self, defaults, layout, cursor_position, viewport);
|
||||
|
||||
let mut primitives = Vec::new();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue