mirror of
https://github.com/penpot/penpot.git
synced 2026-03-14 06:17:25 +00:00
🐛 Fix frame clipping artifact
This commit is contained in:
@@ -745,16 +745,17 @@ impl RenderState {
|
||||
s.canvas().concat(transform);
|
||||
});
|
||||
|
||||
// Hard clip edge (antialias = false) to avoid alpha seam when clipping
|
||||
// semi-transparent content larger than the frame.
|
||||
if let Some(corners) = corners {
|
||||
let rrect = RRect::new_rect_radii(*bounds, corners);
|
||||
self.surfaces.apply_mut(surface_ids, |s| {
|
||||
s.canvas()
|
||||
.clip_rrect(rrect, skia::ClipOp::Intersect, antialias);
|
||||
s.canvas().clip_rrect(rrect, skia::ClipOp::Intersect, false);
|
||||
});
|
||||
} else {
|
||||
self.surfaces.apply_mut(surface_ids, |s| {
|
||||
s.canvas()
|
||||
.clip_rect(*bounds, skia::ClipOp::Intersect, antialias);
|
||||
.clip_rect(*bounds, skia::ClipOp::Intersect, false);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user