diff options
author | 2023-06-29 07:55:52 +0200 | |
---|---|---|
committer | 2023-06-29 07:55:52 +0200 | |
commit | 6921564c9f66e8103e19ec658099c5f5c32e8cc5 (patch) | |
tree | ed833fab41f64c57a7522fea400ea42eec788e9f /graphics/src/renderer.rs | |
parent | fa5650cfd1115e6ccec2ad795cf58fd970d5b43c (diff) | |
download | iced-6921564c9f66e8103e19ec658099c5f5c32e8cc5.tar.gz iced-6921564c9f66e8103e19ec658099c5f5c32e8cc5.tar.bz2 iced-6921564c9f66e8103e19ec658099c5f5c32e8cc5.zip |
Write missing docs in `iced_graphics` and `iced_wgpu`
Diffstat (limited to 'graphics/src/renderer.rs')
-rw-r--r-- | graphics/src/renderer.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs index 459faf40..d80dea34 100644 --- a/graphics/src/renderer.rs +++ b/graphics/src/renderer.rs @@ -48,10 +48,12 @@ impl<B: Backend, T> Renderer<B, T> { f(&mut self.backend, &self.primitives) } + /// Starts recording a new layer. pub fn start_layer(&mut self) -> Vec<Primitive<B::Primitive>> { std::mem::take(&mut self.primitives) } + /// Ends the recording of a layer. pub fn end_layer( &mut self, primitives: Vec<Primitive<B::Primitive>>, @@ -62,10 +64,12 @@ impl<B: Backend, T> Renderer<B, T> { self.primitives.push(Primitive::group(layer).clip(bounds)); } + /// Starts recording a translation. pub fn start_translation(&mut self) -> Vec<Primitive<B::Primitive>> { std::mem::take(&mut self.primitives) } + /// Ends the recording of a translation. pub fn end_translation( &mut self, primitives: Vec<Primitive<B::Primitive>>, |