From 8851bc17b94a921453b0afd9c2421cb30f8d4425 Mon Sep 17 00:00:00 2001 From: Hamilton Kibbe Date: Thu, 9 Oct 2014 18:09:17 -0400 Subject: Doc update --- gerber/render/svgwrite_backend.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gerber/render/svgwrite_backend.py') diff --git a/gerber/render/svgwrite_backend.py b/gerber/render/svgwrite_backend.py index 3b2f3c1..7570c84 100644 --- a/gerber/render/svgwrite_backend.py +++ b/gerber/render/svgwrite_backend.py @@ -152,7 +152,9 @@ class GerberSvgContext(GerberContext): ap = self.apertures.get(self.aperture, None) if ap is None: return - self.dwg.add(ap.line(self, x, y, convert_color(self.color))) + color = (convert_color(self.color) if self.level_polarity == 'dark' + else convert_color(self.background_color)) + self.dwg.add(ap.line(self, x, y, color)) self.move(x, y, resolve=False) def arc(self, x, y, i, j): @@ -171,7 +173,9 @@ class GerberSvgContext(GerberContext): ap = self.apertures.get(self.aperture, None) if ap is None: return - for shape in ap.flash(self, x, y, convert_color(self.color)): + color = (convert_color(self.color) if self.level_polarity == 'dark' + else convert_color(self.background_color)) + for shape in ap.flash(self, x, y, color): self.dwg.add(shape) self.move(x, y, resolve=False) -- cgit