From cb1d3eb3fb1522506419aa19c18e09386c91365b Mon Sep 17 00:00:00 2001 From: jaseg Date: Tue, 5 Jul 2022 11:16:37 +0200 Subject: pretty svg export: Mirror board bottom side --- gerbonara/layers.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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): -- cgit