summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-21 03:57:44 -0500
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-21 03:57:44 -0500
commit5476da8aa3f4ee424f56f4f2491e7af1c4b7b758 (patch)
tree427dafda78ee21a1846a2b9c9747dd96afe7e8a3 /examples
parent7a532514631384dbfc9d7fc2002cbbfe52433c9f (diff)
downloadgerbonara-5476da8aa3f4ee424f56f4f2491e7af1c4b7b758.tar.gz
gerbonara-5476da8aa3f4ee424f56f4f2491e7af1c4b7b758.tar.bz2
gerbonara-5476da8aa3f4ee424f56f4f2491e7af1c4b7b758.zip
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
Diffstat (limited to 'examples')
-rw-r--r--examples/cairo_example.pngbin104401 -> 104184 bytes
-rw-r--r--examples/pcb_example.py7
-rw-r--r--examples/pcb_top.pngbin99269 -> 98827 bytes
3 files changed, 4 insertions, 3 deletions
diff --git a/examples/cairo_example.png b/examples/cairo_example.png
index f33cc69..671de5c 100644
--- a/examples/cairo_example.png
+++ b/examples/cairo_example.png
Binary files differ
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'])
diff --git a/examples/pcb_top.png b/examples/pcb_top.png
index bf1d687..60bc245 100644
--- a/examples/pcb_top.png
+++ b/examples/pcb_top.png
Binary files differ