diff options
Diffstat (limited to '')
-rw-r--r-- | native/src/renderer.rs | 7 | ||||
-rw-r--r-- | native/src/renderer/null.rs | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/native/src/renderer.rs b/native/src/renderer.rs index e48c701d..6d12edae 100644 --- a/native/src/renderer.rs +++ b/native/src/renderer.rs @@ -46,10 +46,11 @@ pub trait Renderer: Sized { element.layout(self, limits) } - fn with_layer( + fn with_layer(&mut self, bounds: Rectangle, f: impl FnOnce(&mut Self)); + + fn with_translation( &mut self, - bounds: Rectangle, - offset: Vector<u32>, + translation: Vector, f: impl FnOnce(&mut Self), ); diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs index 485c5b2c..cc1d41ba 100644 --- a/native/src/renderer/null.rs +++ b/native/src/renderer/null.rs @@ -1,4 +1,3 @@ -use crate::pane_grid; use crate::progress_bar; use crate::renderer::{self, Renderer}; use crate::text; @@ -19,10 +18,11 @@ impl Null { } impl Renderer for Null { - fn with_layer( + fn with_layer(&mut self, _bounds: Rectangle, _f: impl FnOnce(&mut Self)) {} + + fn with_translation( &mut self, - _bounds: Rectangle, - _offset: Vector<u32>, + _translation: Vector, _f: impl FnOnce(&mut Self), ) { } |