From 5aaf18889c3cdc31ae61b9593bf5848bc57ec09a Mon Sep 17 00:00:00 2001 From: Paulo Henrique Silva Date: Thu, 9 Jul 2015 03:54:47 -0300 Subject: Initial patch to unify our render towards cairo This branch allows a pure cairo based render for both PNG and SVG. Cairo backend is mostly the same but with improved support for configurable scale, orientation and inverted color drawing. API is not yet final. --- gerber/cam.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gerber/cam.py') diff --git a/gerber/cam.py b/gerber/cam.py index 31b6d2f..91ffb9a 100644 --- a/gerber/cam.py +++ b/gerber/cam.py @@ -253,8 +253,9 @@ class CamFile(object): filename : string 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) + if ctx.invert: + ctx._paint_inverted_layer() + for p in self.primitives: ctx.render(p) if filename is not None: -- cgit