summaryrefslogtreecommitdiff
path: root/examples/pcb_example.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2017-02-24 08:38:13 -0500
committerGitHub <noreply@github.com>2017-02-24 08:38:13 -0500
commitdd0abbf3072b59c8e5ec437a85ccaf01272d8043 (patch)
tree8ea84f945d9267cf218291ca9700fd68cf530d99 /examples/pcb_example.py
parentb5e7b021ee6fb81dd6b8d8e6767284e4987b6db7 (diff)
parent19a8fb00487ca182bd3127b4def52719d8be3e30 (diff)
downloadgerbonara-dd0abbf3072b59c8e5ec437a85ccaf01272d8043.tar.gz
gerbonara-dd0abbf3072b59c8e5ec437a85ccaf01272d8043.tar.bz2
gerbonara-dd0abbf3072b59c8e5ec437a85ccaf01272d8043.zip
Merge pull request #65 from curtacircuitos/auto_scale_renders
Add max_width and max_height arguments to cairo context render_layers method
Diffstat (limited to 'examples/pcb_example.py')
-rw-r--r--examples/pcb_example.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/pcb_example.py b/examples/pcb_example.py
index e6a56fc..9e066a8 100644
--- a/examples/pcb_example.py
+++ b/examples/pcb_example.py
@@ -37,16 +37,16 @@ pcb = PCB.from_directory(GERBER_FOLDER)
# Render PCB top view
ctx.render_layers(pcb.top_layers,
os.path.join(os.path.dirname(__file__), 'pcb_top.png',),
- theme.THEMES['OSH Park'])
+ theme.THEMES['OSH Park'], max_width=800, max_height=600)
# Render PCB bottom view
ctx.render_layers(pcb.bottom_layers,
os.path.join(os.path.dirname(__file__), 'pcb_bottom.png'),
- theme.THEMES['OSH Park'])
+ theme.THEMES['OSH Park'], max_width=800, max_height=600)
# Render copper layers only
ctx.render_layers(pcb.copper_layers + pcb.drill_layers,
os.path.join(os.path.dirname(__file__),
'pcb_transparent_copper.png'),
- theme.THEMES['Transparent Copper'])
+ theme.THEMES['Transparent Copper'], max_width=800, max_height=600)