diff options
author | Nein Seg <gitlab.neinseg@jaseg.de> | 2022-07-30 11:15:08 +0000 |
---|---|---|
committer | Nein Seg <gitlab.neinseg@jaseg.de> | 2022-07-30 11:15:08 +0000 |
commit | fb52e104081138a1f6abb8f6c9f7d0c6c2439c1e (patch) | |
tree | 6ff963dc8f7d31ceb109ed11f900f40c1ce36b84 /gerbonara/layers.py | |
parent | 8f4cdd881063cf68e6535e96e098d07bef0ffa37 (diff) | |
parent | fec4cf0057e33079e880b7f799a432f416fbf0a7 (diff) | |
download | gerbonara-fb52e104081138a1f6abb8f6c9f7d0c6c2439c1e.tar.gz gerbonara-fb52e104081138a1f6abb8f6c9f7d0c6c2439c1e.tar.bz2 gerbonara-fb52e104081138a1f6abb8f6c9f7d0c6c2439c1e.zip |
Merge branch 'fix/to_svg' into 'main'v0.11.2
fix: runtime errors on LayerStack#to_svg
See merge request gerbolyze/gerbonara!1
Diffstat (limited to 'gerbonara/layers.py')
-rw-r--r-- | gerbonara/layers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gerbonara/layers.py b/gerbonara/layers.py index a738a45..19d0195 100644 --- a/gerbonara/layers.py +++ b/gerbonara/layers.py @@ -479,7 +479,7 @@ class LayerStack: def __repr__(self):
return str(self)
- def to_svg(self, margin=0, arg_unit=MM, svg_unit=MM, force_bounds=None, tag=Tag):
+ def to_svg(self, margin=0, arg_unit=MM, svg_unit=MM, force_bounds=None, tag=Tag, page_bg="white"):
if force_bounds:
bounds = svg_unit.convert_bounds_from(arg_unit, force_bounds)
else:
@@ -492,9 +492,9 @@ class LayerStack: for i, layer in enumerate(self.drill_layers):
tags.append(tag('g', list(layer.svg_objects(svg_unit=svg_unit, fg='black', bg="white", tag=Tag)),
- id=f'l-{drill}-{i}'))
+ id=f'l-drill-{i}'))
- return setup_svg(tags, bounds, margin=margin, arg_unit=arg_unit, svg_unit=svg_unit, pagecolor=bg, tag=tag)
+ return setup_svg(tags, bounds, margin=margin, arg_unit=arg_unit, svg_unit=svg_unit, pagecolor=page_bg, tag=tag)
def to_pretty_svg(self, side='top', margin=0, arg_unit=MM, svg_unit=MM, force_bounds=None, tag=Tag, inkscape=False, colors=None):
if colors is None:
|