diff options
Diffstat (limited to 'gerber/gerber.py')
-rw-r--r-- | gerber/gerber.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gerber/gerber.py b/gerber/gerber.py index 220405c..04203fa 100644 --- a/gerber/gerber.py +++ b/gerber/gerber.py @@ -111,13 +111,14 @@ class GerberFile(CncFile): for statement in self.statements: f.write(statement.to_gerber()) - def render(self, filename, ctx): + def render(self, ctx, filename=None): """ Generate image of layer. """ ctx.set_bounds(self.bounds) for statement in self.statements: ctx.evaluate(statement) - ctx.dump(filename) + if filename is not None: + ctx.dump(filename) class GerberParser(object): |