summaryrefslogtreecommitdiff
path: root/gerber/__main__.py
diff options
context:
space:
mode:
authorHamilton Kibbe <ham@hamiltonkib.be>2014-10-13 13:26:32 -0400
committerHamilton Kibbe <ham@hamiltonkib.be>2014-10-13 13:26:32 -0400
commitc50949e15a839ecd27a6da273ccaf1dc3a7d7853 (patch)
treeb7c87b6ff5e0f07fdc0960fa0960a6607ce44b22 /gerber/__main__.py
parent6adcdbae5fc06959203761616e778ba4594475cc (diff)
downloadgerbonara-c50949e15a839ecd27a6da273ccaf1dc3a7d7853.tar.gz
gerbonara-c50949e15a839ecd27a6da273ccaf1dc3a7d7853.tar.bz2
gerbonara-c50949e15a839ecd27a6da273ccaf1dc3a7d7853.zip
Add SVG transparency
Diffstat (limited to 'gerber/__main__.py')
-rw-r--r--gerber/__main__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/gerber/__main__.py b/gerber/__main__.py
index ab0f377..10da12e 100644
--- a/gerber/__main__.py
+++ b/gerber/__main__.py
@@ -25,11 +25,18 @@ if __name__ == '__main__':
sys.exit(1)
ctx = GerberSvgContext()
-
+ ctx.set_alpha(0.95)
for filename in sys.argv[1:]:
print "parsing %s" % filename
+ if 'GTO' in filename or 'GBO' in filename:
+ ctx.set_color((1,1,1))
+ ctx.set_alpha(0.8)
+ elif 'GTS' in filename or 'GBS' in filename:
+ ctx.set_color((0.2,0.2,0.75))
+ ctx.set_alpha(0.8)
gerberfile = read(filename)
gerberfile.render(ctx)
+
print('Saving image to test.svg')
ctx.dump('test.svg')