Don't draw if no paint is active

This commit is contained in:
Laurenz Stampfl 2025-03-27 16:41:47 +01:00
parent 68841294ba
commit 074eedfc51

View File

@ -56,9 +56,12 @@ pub(crate) fn handle_shape(
None None
}; };
surface.set_fill(fill); // Otherwise, krilla will by default fill with a black paint.
surface.set_stroke(stroke); if fill.is_some() || stroke.is_some() {
surface.draw_path(&path); surface.set_fill(fill);
surface.set_stroke(stroke);
surface.draw_path(&path);
}
} }
surface.pop(); surface.pop();