mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🎉 Implement drawing with blend mode (single fill)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user