summaryrefslogtreecommitdiff
path: root/gerber/cam.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2015-09-10 15:54:29 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2015-09-10 15:54:29 -0400
commitb81c9d4bf96845ced3495eb158ec3a3c9e4dce3d (patch)
treeab939229a9735a4c0fd831daf0a11151d3c78d0a /gerber/cam.py
parentc92d2d9ea2853fd22b5ff51f211b03b4e660c551 (diff)
parentcb2fa34e881a389cf8a4bc98fd12be662ff687f8 (diff)
downloadgerbonara-b81c9d4bf96845ced3495eb158ec3a3c9e4dce3d.tar.gz
gerbonara-b81c9d4bf96845ced3495eb158ec3a3c9e4dce3d.tar.bz2
gerbonara-b81c9d4bf96845ced3495eb158ec3a3c9e4dce3d.zip
Merge pull request #40 from curtacircuitos/cairo-render-unification
Cairo render unification
Diffstat (limited to 'gerber/cam.py')
-rw-r--r--gerber/cam.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gerber/cam.py b/gerber/cam.py
index 23d8214..c567055 100644
--- a/gerber/cam.py
+++ b/gerber/cam.py
@@ -254,8 +254,11 @@ class CamFile(object):
filename : string <optional>
If provided, save the rendered image to `filename`
"""
- bounds = [tuple([x * 1.2, y*1.2]) for x, y in self.bounds]
- ctx.set_bounds(bounds)
+ ctx.set_bounds(self.bounds)
+ ctx._paint_background()
+ if ctx.invert:
+ ctx._paint_inverted_layer()
+
for p in self.primitives:
ctx.render(p)
if filename is not None: