diff options
author | Hamilton Kibbe <ham@hamiltonkib.be> | 2014-10-09 18:09:17 -0400 |
---|---|---|
committer | Hamilton Kibbe <ham@hamiltonkib.be> | 2014-10-09 18:09:17 -0400 |
commit | 8851bc17b94a921453b0afd9c2421cb30f8d4425 (patch) | |
tree | 8d1ccf602eddf71998e78428ffca096c11d82dc8 /gerber/render/svgwrite_backend.py | |
parent | 84bfd34e918251ff82f4b3818bc6268feab72efe (diff) | |
download | gerbonara-8851bc17b94a921453b0afd9c2421cb30f8d4425.tar.gz gerbonara-8851bc17b94a921453b0afd9c2421cb30f8d4425.tar.bz2 gerbonara-8851bc17b94a921453b0afd9c2421cb30f8d4425.zip |
Doc update
Diffstat (limited to 'gerber/render/svgwrite_backend.py')
-rw-r--r-- | gerber/render/svgwrite_backend.py | 8 |
1 files changed, 6 insertions, 2 deletions
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) |