summaryrefslogtreecommitdiff
path: root/gerber/render/theme.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-21 04:39:55 -0500
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-21 04:39:55 -0500
commit66a0d09e72b078da5820820aa5c6a2a7d7430507 (patch)
tree9c65368f91deb934859969fc4e155fcca35819f8 /gerber/render/theme.py
parent5476da8aa3f4ee424f56f4f2491e7af1c4b7b758 (diff)
downloadgerbonara-66a0d09e72b078da5820820aa5c6a2a7d7430507.tar.gz
gerbonara-66a0d09e72b078da5820820aa5c6a2a7d7430507.tar.bz2
gerbonara-66a0d09e72b078da5820820aa5c6a2a7d7430507.zip
Add support for mirrored rendering
- The default theme now renders the bottom layers mirrored. - see https://github.com/curtacircuitos/pcb-tools/blob/master/examples/pcb_bottom.png for an example.
Diffstat (limited to 'gerber/render/theme.py')
-rw-r--r--gerber/render/theme.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/gerber/render/theme.py b/gerber/render/theme.py
index 6135ccb..4d325c5 100644
--- a/gerber/render/theme.py
+++ b/gerber/render/theme.py
@@ -41,11 +41,11 @@ class Theme(object):
self.name = 'Default' if name is None else name
self.background = kwargs.get('background', RenderSettings(COLORS['black'], alpha=0.0))
self.topsilk = kwargs.get('topsilk', RenderSettings(COLORS['white']))
- self.bottomsilk = kwargs.get('bottomsilk', RenderSettings(COLORS['white']))
+ self.bottomsilk = kwargs.get('bottomsilk', RenderSettings(COLORS['white'], mirror=True))
self.topmask = kwargs.get('topmask', RenderSettings(COLORS['green soldermask'], alpha=0.8, invert=True))
- self.bottommask = kwargs.get('bottommask', RenderSettings(COLORS['green soldermask'], alpha=0.8, invert=True))
+ self.bottommask = kwargs.get('bottommask', RenderSettings(COLORS['green soldermask'], alpha=0.8, invert=True, mirror=True))
self.top = kwargs.get('top', RenderSettings(COLORS['hasl copper']))
- self.bottom = kwargs.get('top', RenderSettings(COLORS['hasl copper']))
+ self.bottom = kwargs.get('bottom', RenderSettings(COLORS['hasl copper'], mirror=True))
self.drill = kwargs.get('drill', RenderSettings(COLORS['black']))
self.ipc_netlist = kwargs.get('ipc_netlist', RenderSettings(COLORS['red']))
@@ -61,9 +61,10 @@ THEMES = {
'default': Theme(),
'OSH Park': Theme(name='OSH Park',
top=RenderSettings(COLORS['enig copper']),
- bottom=RenderSettings(COLORS['enig copper']),
+ bottom=RenderSettings(COLORS['enig copper'], mirror=True),
topmask=RenderSettings(COLORS['purple soldermask'], alpha=0.8, invert=True),
- bottommask=RenderSettings(COLORS['purple soldermask'], alpha=0.8, invert=True)),
+ bottommask=RenderSettings(COLORS['purple soldermask'], alpha=0.8, invert=True, mirror=True)),
+
'Blue': Theme(name='Blue',
topmask=RenderSettings(COLORS['blue soldermask'], alpha=0.8, invert=True),
bottommask=RenderSettings(COLORS['blue soldermask'], alpha=0.8, invert=True)),