Implement Frame::clip for iced_tiny_skia
This commit is contained in:
parent
04c0ba04bf
commit
6fae8bf6cb
1 changed files with 6 additions and 1 deletions
|
|
@ -125,7 +125,12 @@ impl Frame {
|
|||
self.transform = self.stack.pop().expect("Pop transform");
|
||||
}
|
||||
|
||||
pub fn clip(&mut self, _frame: Self, _translation: Vector) {}
|
||||
pub fn clip(&mut self, frame: Self, translation: Vector) {
|
||||
self.primitives.push(Primitive::Translate {
|
||||
translation,
|
||||
content: Box::new(frame.into_primitive()),
|
||||
});
|
||||
}
|
||||
|
||||
pub fn translate(&mut self, translation: Vector) {
|
||||
self.transform =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue