From 6921564c9f66e8103e19ec658099c5f5c32e8cc5 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 29 Jun 2023 07:55:52 +0200 Subject: Write missing docs in `iced_graphics` and `iced_wgpu` --- graphics/src/renderer.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'graphics/src/renderer.rs') 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 Renderer { f(&mut self.backend, &self.primitives) } + /// Starts recording a new layer. pub fn start_layer(&mut self) -> Vec> { std::mem::take(&mut self.primitives) } + /// Ends the recording of a layer. pub fn end_layer( &mut self, primitives: Vec>, @@ -62,10 +64,12 @@ impl Renderer { self.primitives.push(Primitive::group(layer).clip(bounds)); } + /// Starts recording a translation. pub fn start_translation(&mut self) -> Vec> { std::mem::take(&mut self.primitives) } + /// Ends the recording of a translation. pub fn end_translation( &mut self, primitives: Vec>, -- cgit