From f40da376ce1e7a508d8dde85697326b8a0eed373 Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Wed, 23 Feb 2022 11:36:41 -0800 Subject: Add doc comment --- graphics/src/widget/canvas/frame.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'graphics') diff --git a/graphics/src/widget/canvas/frame.rs b/graphics/src/widget/canvas/frame.rs index 01b27451..23db843d 100644 --- a/graphics/src/widget/canvas/frame.rs +++ b/graphics/src/widget/canvas/frame.rs @@ -244,7 +244,14 @@ impl Frame { self.transforms.current = self.transforms.previous.pop().unwrap(); } - /// TODO... + /// Stores the current transform of the [`Frame`] and executes the given + /// drawing operations within a clipped [`Rectange`] at translation / size, + /// restoring the transform afterwards. + /// + /// This method is userful to perform drawing operations that need to be + /// clipped. + /// + /// [`Rectange`]: crate::Rectangle #[inline] pub fn with_clip( &mut self, -- cgit