mirror of
https://github.com/typst/typst
synced 2025-08-15 07:28:32 +08:00
Don't draw if no paint is active
This commit is contained in:
parent
68841294ba
commit
074eedfc51
@ -56,9 +56,12 @@ pub(crate) fn handle_shape(
|
||||
None
|
||||
};
|
||||
|
||||
surface.set_fill(fill);
|
||||
surface.set_stroke(stroke);
|
||||
surface.draw_path(&path);
|
||||
// Otherwise, krilla will by default fill with a black paint.
|
||||
if fill.is_some() || stroke.is_some() {
|
||||
surface.set_fill(fill);
|
||||
surface.set_stroke(stroke);
|
||||
surface.draw_path(&path);
|
||||
}
|
||||
}
|
||||
|
||||
surface.pop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user