summaryrefslogtreecommitdiff
path: root/examples/pcb_example.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pcb_example.py')
-rw-r--r--examples/pcb_example.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/pcb_example.py b/examples/pcb_example.py
index 5341da0..bba030e 100644
--- a/examples/pcb_example.py
+++ b/examples/pcb_example.py
@@ -24,6 +24,7 @@ import os
from gerber import PCB
from gerber.render import GerberCairoContext, theme
+
GERBER_FOLDER = os.path.abspath(os.path.join(os.path.dirname(__file__), 'gerbers'))
@@ -33,7 +34,7 @@ ctx = GerberCairoContext()
# Create a new PCB
pcb = PCB.from_directory(GERBER_FOLDER)
-pcb.theme = theme.THEMES['OSH Park']
-ctx.render_layers(pcb.top_layers, os.path.join(os.path.dirname(__file__), 'pcb_top.png'))
-ctx.render_layers(pcb.bottom_layers, os.path.join(os.path.dirname(__file__), 'pcb_bottom.png'))
+# Render PCB
+ctx.render_layers(pcb.top_layers, os.path.join(os.path.dirname(__file__), 'pcb_top.png',), theme.THEMES['OSH Park'])
+ctx.render_layers(pcb.bottom_layers, os.path.join(os.path.dirname(__file__), 'pcb_bottom.png'), theme.THEMES['OSH Park'])