mirror of
https://github.com/typst/typst
synced 2025-08-15 15:38:33 +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
|
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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user