Add max_width and max_height arguments to

This commit is contained in:
Hamilton Kibbe 2016-12-13 20:22:54 -05:00
parent 7c4ec8a768
commit 19a8fb0048
5 changed files with 25 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Before After
Before After

View file

@ -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)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Before After
Before After