summaryrefslogtreecommitdiff
path: root/gerber/render/svgwrite_backend.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-08 09:27:52 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-08 09:27:52 -0400
commit1653ae5cbe88757e453bccf499dc1b8ccb278e58 (patch)
treeb80b610fb0c5c52c91edbe753947daeb0e39db20 /gerber/render/svgwrite_backend.py
parent100ab899ed7a1a49c3401b87b7d6b0f53a043dbc (diff)
downloadgerbonara-1653ae5cbe88757e453bccf499dc1b8ccb278e58.tar.gz
gerbonara-1653ae5cbe88757e453bccf499dc1b8ccb278e58.tar.bz2
gerbonara-1653ae5cbe88757e453bccf499dc1b8ccb278e58.zip
Update readme and example
Diffstat (limited to 'gerber/render/svgwrite_backend.py')
-rw-r--r--gerber/render/svgwrite_backend.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gerber/render/svgwrite_backend.py b/gerber/render/svgwrite_backend.py
index 7d5c8fd..8d84da1 100644
--- a/gerber/render/svgwrite_backend.py
+++ b/gerber/render/svgwrite_backend.py
@@ -110,12 +110,14 @@ class GerberSvgContext(GerberContext):
self.apertures = {}
self.dwg = svgwrite.Drawing()
- #self.dwg.add(self.dwg.rect(insert=(0, 0), size=(2000, 2000), fill="black"))
+ self.background = False
def set_bounds(self, bounds):
xbounds, ybounds = bounds
size = (SCALE * (xbounds[1] - xbounds[0]), SCALE * (ybounds[1] - ybounds[0]))
- self.dwg.add(self.dwg.rect(insert=(SCALE * xbounds[0], -SCALE * ybounds[1]), size=size, fill="black"))
+ if not self.background:
+ self.dwg.add(self.dwg.rect(insert=(SCALE * xbounds[0], -SCALE * ybounds[1]), size=size, fill="black"))
+ self.background = True
def define_aperture(self, d, shape, modifiers):
aperture = None