more svg write options
@@ -6,7 +6,15 @@ from .._exceptions import WriteError
from .._helpers import register
-def write(filename, mesh, float_fmt=".3f", stroke_width="1", force_width=None):
+def write(
+ filename,
+ mesh,
+ float_fmt=".3f",
+ stroke_width="1",
+ force_width=None,
+ fill="none",
+ stroke="black",
+):
if mesh.points.shape[1] == 3 and not numpy.allclose(
mesh.points[:, 2], 0.0, rtol=0.0, atol=1.0e-14
):
@@ -40,8 +48,8 @@ def write(filename, mesh, float_fmt=".3f", stroke_width="1", force_width=None):
style = ET.SubElement(svg, "style")
opts = [
- "fill: none",
- "stroke: black",
+ f"fill: {fill}",
+ f"stroke: {stroke}",
f"stroke-width: {stroke_width}",
"stroke-linejoin:bevel",
]
