From b01c4822b6da6b7be37becb73c58f60621f6366f Mon Sep 17 00:00:00 2001 From: Garret Fick Date: Sat, 25 Jun 2016 12:27:28 +0800 Subject: Render aperture macros with clear regions --- gerber/render/cairo_backend.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gerber/render') diff --git a/gerber/render/cairo_backend.py b/gerber/render/cairo_backend.py index 1d168ca..c1bd60c 100644 --- a/gerber/render/cairo_backend.py +++ b/gerber/render/cairo_backend.py @@ -191,8 +191,11 @@ class GerberCairoContext(GerberContext): self.ctx.stroke() def _render_amgroup(self, amgroup, color): + self.ctx.push_group() for primitive in amgroup.primitives: self.render(primitive) + self.ctx.pop_group_to_source() + self.ctx.paint_with_alpha(1) def _render_test_record(self, primitive, color): self.ctx.select_font_face('monospace', cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_NORMAL) -- cgit