We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 37a3285 + c8a6d8e commit e48b275Copy full SHA for e48b275
canvas/src/lib.rs
@@ -358,8 +358,11 @@ impl CanvasRenderingContext2D {
358
359
let mut clip_path = ClipPath::new(outline);
360
clip_path.set_fill_rule(fill_rule);
361
- let clip_path_id = self.canvas.scene.push_clip_path(clip_path);
+ if let Some(existing_clip_path) = self.current_state.clip_path.take() {
362
+ clip_path.set_clip_path(Some(existing_clip_path));
363
+ }
364
365
+ let clip_path_id = self.canvas.scene.push_clip_path(clip_path);
366
self.current_state.clip_path = Some(clip_path_id);
367
}
368
0 commit comments