mirror of
https://github.com/penpot/penpot.git
synced 2026-08-04 11:58:48 +00:00
🐛 Fix frame clipping artifact
This commit is contained in:
parent
740e790585
commit
cfe11a930c
@ -745,16 +745,17 @@ impl RenderState {
|
|||||||
s.canvas().concat(transform);
|
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 {
|
if let Some(corners) = corners {
|
||||||
let rrect = RRect::new_rect_radii(*bounds, corners);
|
let rrect = RRect::new_rect_radii(*bounds, corners);
|
||||||
self.surfaces.apply_mut(surface_ids, |s| {
|
self.surfaces.apply_mut(surface_ids, |s| {
|
||||||
s.canvas()
|
s.canvas().clip_rrect(rrect, skia::ClipOp::Intersect, false);
|
||||||
.clip_rrect(rrect, skia::ClipOp::Intersect, antialias);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
self.surfaces.apply_mut(surface_ids, |s| {
|
self.surfaces.apply_mut(surface_ids, |s| {
|
||||||
s.canvas()
|
s.canvas()
|
||||||
.clip_rect(*bounds, skia::ClipOp::Intersect, antialias);
|
.clip_rect(*bounds, skia::ClipOp::Intersect, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user