mirror of
https://github.com/penpot/penpot.git
synced 2025-05-15 17:16:39 +02:00
🎉 Implement drawing with blend mode (single fill)
This commit is contained in:
parent
7458165e51
commit
966e942a7f
5 changed files with 87 additions and 15 deletions
|
@ -141,7 +141,10 @@ fn render_single_shape(surface: &mut skia::Surface, shape: &Shape) {
|
|||
|
||||
surface.canvas().concat(&matrix);
|
||||
|
||||
// TODO: use blend mode for the shape as a whole, not in each fill
|
||||
for fill in shape.fills().rev() {
|
||||
surface.canvas().draw_rect(r, &fill.to_paint());
|
||||
let mut p = fill.to_paint();
|
||||
p.set_blend_mode(shape.blend_mode.into());
|
||||
surface.canvas().draw_rect(r, &p);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue