[librsvg: 7/8] Docs for nested()




commit 8aa7f40881139a9a2dea5c6f740a77c6c43078dd
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu May 6 14:35:52 2021 -0500

    Docs for nested()

 src/drawing_ctx.rs | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/drawing_ctx.rs b/src/drawing_ctx.rs
index e0a889a2..78d8fe2a 100644
--- a/src/drawing_ctx.rs
+++ b/src/drawing_ctx.rs
@@ -276,6 +276,12 @@ impl DrawingCtx {
         }
     }
 
+    /// Copies a `DrawingCtx` for temporary use on a Cairo surface.
+    ///
+    /// `DrawingCtx` maintains state using during the drawing process, and sometimes we
+    /// would like to use that same state but on a different Cairo surface and context
+    /// than the ones being used on `self`.  This function copies the `self` state into a
+    /// new `DrawingCtx`, and ties the copied one to the supplied `cr`.
     fn nested(&self, cr: cairo::Context) -> DrawingCtx {
         let cr_stack = self.cr_stack.clone();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]