summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Cory Forsstrom <cforsstrom18@gmail.com>2022-02-23 11:36:41 -0800
committerLibravatar Cory Forsstrom <cforsstrom18@gmail.com>2022-02-23 11:36:41 -0800
commitf40da376ce1e7a508d8dde85697326b8a0eed373 (patch)
tree2ce21731e82141634495845eee26495c71b94140 /graphics
parent16b63031c15d3469c82a24936494e59c36d4d529 (diff)
downloadiced-f40da376ce1e7a508d8dde85697326b8a0eed373.tar.gz
iced-f40da376ce1e7a508d8dde85697326b8a0eed373.tar.bz2
iced-f40da376ce1e7a508d8dde85697326b8a0eed373.zip
Add doc comment
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/widget/canvas/frame.rs9
1 files changed, 8 insertions, 1 deletions
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,