mirror of
https://github.com/penpot/penpot.git
synced 2026-07-03 21:05:25 +00:00
🐛 Fix text inner stroke fill seam by compositing fill inside SrcIn (#10509)
* 🐛 Fix text inner stroke fill seam by compositing fill inside SrcIn * 🔧 Update e2e Playwright screenshots
This commit is contained in:
parent
6cc2c403c4
commit
f25317ac47
Binary file not shown.
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 80 KiB |
@ -569,11 +569,11 @@ fn draw_text(
|
||||
/// paint mask — opaque fill as clip mask
|
||||
/// saveLayer(SrcIn) — clips stroke to mask shape
|
||||
/// paint stroke
|
||||
/// saveLayer(DstOver) — fill behind the stroke
|
||||
/// paint fill
|
||||
/// restore
|
||||
/// restore
|
||||
/// restore
|
||||
/// saveLayer(DstOver) — fill behind the stroke
|
||||
/// paint fill
|
||||
/// restore
|
||||
/// restore
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn render_inner_stroke_on_canvas(
|
||||
@ -615,10 +615,7 @@ fn render_inner_stroke_on_canvas(
|
||||
// Draw stroke
|
||||
paint_text(canvas, shape, stroke_builders);
|
||||
|
||||
canvas.restore(); // SrcIn layer
|
||||
canvas.restore(); // mask group layer
|
||||
|
||||
// Fill with DstOver (behind the stroke result)
|
||||
// Fill with DstOver (behind the stroke, inside SrcIn)
|
||||
let mut dst_over_paint = Paint::default();
|
||||
dst_over_paint.set_blend_mode(skia::BlendMode::DstOver);
|
||||
canvas.save_layer(&SaveLayerRec::default().paint(&dst_over_paint));
|
||||
@ -626,6 +623,8 @@ fn render_inner_stroke_on_canvas(
|
||||
paint_text(canvas, shape, fill_builders);
|
||||
|
||||
canvas.restore(); // DstOver layer
|
||||
canvas.restore(); // SrcIn layer
|
||||
canvas.restore(); // mask group layer
|
||||
canvas.restore(); // outer layer
|
||||
|
||||
if layer_opacity.is_some() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user