summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/tests/image_support.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-09 19:59:15 +0100
committerjaseg <git@jaseg.de>2022-01-09 19:59:15 +0100
commit4d77937f01e4a7561f412a07e1e2c5a5dba0fc49 (patch)
tree5f9d0ab2fb8cd7f57ca17dd8abb107b39d40c52b /gerbonara/gerber/tests/image_support.py
parentd6f0f0cff4fa56af7754a12c87fb6bc10e212422 (diff)
downloadgerbonara-4d77937f01e4a7561f412a07e1e2c5a5dba0fc49.tar.gz
gerbonara-4d77937f01e4a7561f412a07e1e2c5a5dba0fc49.tar.bz2
gerbonara-4d77937f01e4a7561f412a07e1e2c5a5dba0fc49.zip
Make bounding box tests pass
Diffstat (limited to 'gerbonara/gerber/tests/image_support.py')
-rw-r--r--gerbonara/gerber/tests/image_support.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerbonara/gerber/tests/image_support.py b/gerbonara/gerber/tests/image_support.py
index dc2cbdb..ee84203 100644
--- a/gerbonara/gerber/tests/image_support.py
+++ b/gerbonara/gerber/tests/image_support.py
@@ -60,8 +60,8 @@ def run_cargo_cmd(cmd, args, **kwargs):
except FileNotFoundError:
return subprocess.run([str(Path.home() / '.cargo' / 'bin' / cmd), *args], **kwargs)
-def svg_to_png(in_svg, out_png, dpi=100):
- run_cargo_cmd('resvg', ['--dpi', str(dpi), in_svg, out_png], check=True, stdout=subprocess.DEVNULL)
+def svg_to_png(in_svg, out_png, dpi=100, bg='black'):
+ run_cargo_cmd('resvg', ['--background', bg, '--dpi', str(dpi), in_svg, out_png], check=True, stdout=subprocess.DEVNULL)
def gerbv_export(in_gbr, out_svg, format='svg', origin=(0, 0), size=(6, 6), fg='#ffffff'):
x, y = origin