Fix a bunch of rendering bugs.
- 'clear' polarity primitives no longer erase background
- Added aperture macro support for polygons
- Added aperture macro rendring support
- Renderer now creates a new surface for each layer and merges them instead of working
directly on a single surface
- Updated examples accordingly
This commit is contained in:
parent
7a53251463
commit
5476da8aa3
33 changed files with 1785 additions and 953 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
|
@ -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'])
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 96 KiB |
Loading…
Add table
Add a link
Reference in a new issue