0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

🐛 Fix not clearing drawing surface before drawing shapes

This commit is contained in:
Belén Albeza 2024-11-15 11:33:26 +01:00
parent d1d34a3aa7
commit 58d3a2984f
2 changed files with 9 additions and 4 deletions

View file

@ -102,8 +102,9 @@
:saturation 26
:color 27
:luminosity 28
3)]
(._set_shape_blend_mode ^js internal-module encoded-blend)))
3)
set-shape-blend-mode (unchecked-get internal-module "_set_shape_blend_mode")]
(^function set-shape-blend-mode encoded-blend)))
(defn set-objects
[objects]

View file

@ -92,7 +92,11 @@ impl RenderState {
pub fn reset_canvas(&mut self) {
self.drawing_surface
.canvas()
.clear(skia_safe::Color::TRANSPARENT);
self.drawing_surface.canvas().reset_matrix();
.clear(skia_safe::Color::TRANSPARENT)
.reset_matrix();
self.final_surface
.canvas()
.clear(skia_safe::Color::TRANSPARENT)
.reset_matrix();
}
}