diff options
author | Garret Fick <garret@ficksworkshop.com> | 2016-07-17 10:42:03 +0800 |
---|---|---|
committer | Garret Fick <garret@ficksworkshop.com> | 2016-07-17 10:42:03 +0800 |
commit | 0dded38353e1d650458f6401aea37a4aadaf28ff (patch) | |
tree | a297c26c7cbb6b1c7d7a9cbe4eb4639b203fba53 /gerber/cam.py | |
parent | d0e9018da0d7c51c2195f641c9189f85378df3e8 (diff) | |
parent | d1598b46c91ee36719460d49d7ba2ed5ecd0ef45 (diff) | |
download | gerbonara-0dded38353e1d650458f6401aea37a4aadaf28ff.tar.gz gerbonara-0dded38353e1d650458f6401aea37a4aadaf28ff.tar.bz2 gerbonara-0dded38353e1d650458f6401aea37a4aadaf28ff.zip |
Merge in negative soldermask. Still required further changes to support negatives for shapes that dont exist in the merge source
Diffstat (limited to 'gerber/cam.py')
-rw-r--r-- | gerber/cam.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gerber/cam.py b/gerber/cam.py index 8e31bf0..ae96474 100644 --- a/gerber/cam.py +++ b/gerber/cam.py @@ -248,7 +248,7 @@ class CamFile(object): """ pass - def render(self, ctx, filename=None): + def render(self, ctx, invert=False, filename=None): """ Generate image of layer. Parameters @@ -262,10 +262,14 @@ class CamFile(object): ctx.set_bounds(self.bounds) ctx._paint_background() - if ctx.invert: + if invert: + ctx.invert = True ctx._paint_inverted_layer() - for p in self.primitives: ctx.render(p) + if invert: + ctx.invert = False + ctx._render_mask() + if filename is not None: ctx.dump(filename) |