summaryrefslogtreecommitdiff
path: root/gerbonara/layers.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-07-05 11:16:37 +0200
committerjaseg <git@jaseg.de>2023-11-14 21:52:12 +0100
commitcb1d3eb3fb1522506419aa19c18e09386c91365b (patch)
tree10f3d7891a5a896ecb5da12922e008e8eaa60521 /gerbonara/layers.py
parent4ee5c51f22684bc28b6e1fa09b9ac15965b99d67 (diff)
downloadgerbonara-cb1d3eb3fb1522506419aa19c18e09386c91365b.tar.gz
gerbonara-cb1d3eb3fb1522506419aa19c18e09386c91365b.tar.bz2
gerbonara-cb1d3eb3fb1522506419aa19c18e09386c91365b.zip
pretty svg export: Mirror board bottom side
Diffstat (limited to 'gerbonara/layers.py')
-rw-r--r--gerbonara/layers.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/gerbonara/layers.py b/gerbonara/layers.py
index 3e9997b..dc2e00d 100644
--- a/gerbonara/layers.py
+++ b/gerbonara/layers.py
@@ -879,7 +879,13 @@ class LayerStack:
id=f'l-mechanical-outline', **stroke_attrs, **inkscape_attrs(f'outline'),
transform=layer_transform))
- tags = [tag('defs', filter_defs + use_defs), *layers]
+ sc_y, tl_y = -1, (bounds[0][1] + bounds[1][1])
+ if side == 'bottom':
+ sc_x, sc_y = -1, (bounds[0][0] + bounds[1][0])
+ else:
+ sc_x, tl_x = 1, 0
+ layer_group = tag('g', layers, transform=f'translate({tl_x} {tl_y}) scale({sc_x} {sc_y})')
+ tags = [tag('defs', filter_defs + use_defs), layer_group]
return setup_svg(tags, bounds, margin=margin, arg_unit=arg_unit, svg_unit=svg_unit, pagecolor="white", tag=tag, inkscape=inkscape)
def bounding_box(self, unit=MM, default=None):