summaryrefslogtreecommitdiff
path: root/gerber/cam.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hkibbe@entic.com>2018-06-05 08:57:37 -0400
committerHamilton Kibbe <hkibbe@entic.com>2018-06-05 08:57:37 -0400
commit5245fb925684b4ebe056e6509bfeca6b167903b5 (patch)
tree56615e66b5a9a2b3e04cf58b0b94604bac7af3f4 /gerber/cam.py
parent31062ba2ce326bf3165c15b325b31b226dc69a11 (diff)
downloadgerbonara-5245fb925684b4ebe056e6509bfeca6b167903b5.tar.gz
gerbonara-5245fb925684b4ebe056e6509bfeca6b167903b5.tar.bz2
gerbonara-5245fb925684b4ebe056e6509bfeca6b167903b5.zip
Fix hard requirement of cairo per #83, and add stubs for required subclass methods to GerberContext per #84
Diffstat (limited to 'gerber/cam.py')
-rw-r--r--gerber/cam.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/gerber/cam.py b/gerber/cam.py
index 15b801a..4f20283 100644
--- a/gerber/cam.py
+++ b/gerber/cam.py
@@ -250,6 +250,10 @@ class CamFile(object):
"""
pass
+ @property
+ def bounding_box(self):
+ pass
+
def to_inch(self):
pass
@@ -271,12 +275,12 @@ class CamFile(object):
from .render import GerberCairoContext
ctx = GerberCairoContext()
ctx.set_bounds(self.bounding_box)
- ctx._paint_background()
+ ctx.paint_background()
ctx.invert = invert
- ctx._new_render_layer()
+ ctx.new_render_layer()
for p in self.primitives:
ctx.render(p)
- ctx._flatten()
+ ctx.flatten()
if filename is not None:
ctx.dump(filename)