summaryrefslogtreecommitdiff
path: root/gerber/cam.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-21 03:57:44 -0500
committerGarret Fick <garret@ficksworkshop.com>2016-08-06 09:40:40 +0800
commit8cd842a41a55ab3d8f558a2e3e198beba7da58a1 (patch)
tree895d818072e043ac5275ed6cdc1d724ea5cd489a /gerber/cam.py
parent965d3ce23b92f8aff1063debd6d3364de15791fe (diff)
downloadgerbonara-8cd842a41a55ab3d8f558a2e3e198beba7da58a1.tar.gz
gerbonara-8cd842a41a55ab3d8f558a2e3e198beba7da58a1.tar.bz2
gerbonara-8cd842a41a55ab3d8f558a2e3e198beba7da58a1.zip
Manually mere rendering changes
Diffstat (limited to 'gerber/cam.py')
-rw-r--r--gerber/cam.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/gerber/cam.py b/gerber/cam.py
index f64aa34..0e19b05 100644
--- a/gerber/cam.py
+++ b/gerber/cam.py
@@ -22,6 +22,7 @@ CAM File
This module provides common base classes for Excellon/Gerber CNC files
"""
+
class FileSettings(object):
""" CAM File Settings
@@ -52,6 +53,7 @@ class FileSettings(object):
specify both. `zero_suppression` will take on the opposite value of `zeros`
and vice versa
"""
+
def __init__(self, notation='absolute', units='inch',
zero_suppression=None, format=(2, 5), zeros=None,
angle_units='degrees'):
@@ -248,6 +250,12 @@ class CamFile(object):
"""
pass
+ def to_inch(self):
+ pass
+
+ def to_metric(self):
+ pass
+
def render(self, ctx, invert=False, filename=None):
""" Generate image of layer.
@@ -262,15 +270,11 @@ class CamFile(object):
ctx.set_bounds(self.bounding_box)
ctx._paint_background()
-
- if invert:
- ctx.invert = True
- ctx._clear_mask()
+ ctx.invert = invert
+ ctx._new_render_layer()
for p in self.primitives:
ctx.render(p)
- if invert:
- ctx.invert = False
- ctx._render_mask()
+ ctx._flatten()
if filename is not None:
ctx.dump(filename)