Introduce viewport to Widget::draw

This should eventually allow us to only generate primitives that are
visible.
This commit is contained in:
Héctor Ramón Jiménez 2020-08-18 03:37:32 +02:00
parent 8a3ce90959
commit d328b07b39
31 changed files with 123 additions and 35 deletions

View file

@ -137,7 +137,7 @@ where
let (body, body_layout) = body;
let (body_primitive, body_interaction) =
body.draw(self, defaults, body_layout, cursor_position);
body.draw(self, defaults, body_layout, cursor_position, &bounds);
let background = crate::widget::container::background(bounds, &style);
@ -224,6 +224,7 @@ where
&defaults,
controls_layout,
cursor_position,
&bounds,
);
(