Introduce a visible_bounds parameter to Element::paint

We're not using this yet but this will be useful to avoid rendering
unnecessary portions of text.
This commit is contained in:
Antonio Scandurra
2021-09-02 11:42:23 +02:00
parent 38dc023942
commit 0490c609fb
21 changed files with 94 additions and 42 deletions
+1 -1
View File
@@ -336,7 +336,7 @@ impl Pane {
} else {
let diameter = 8.;
ConstrainedBox::new(
Canvas::new(move |bounds, cx| {
Canvas::new(move |bounds, _, cx| {
if let Some(current_color) = current_color {
let square = RectF::new(bounds.origin(), vec2f(diameter, diameter));
cx.scene.push_quad(Quad {