summaryrefslogtreecommitdiff
path: root/gerber/__main__.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2016-11-05 21:11:09 -0400
committerGitHub <noreply@github.com>2016-11-05 21:11:09 -0400
commitd2fe4441662435e55f2dc481bf94a2729b9d6a48 (patch)
treedd60a0b21e1d1ca7258b9f978ce973354d96062c /gerber/__main__.py
parent318a81382e074a5897489299a58e029815d23492 (diff)
parent5af19af190c1fb0f0c5be029d46d63e657dde4d9 (diff)
downloadgerbonara-d2fe4441662435e55f2dc481bf94a2729b9d6a48.tar.gz
gerbonara-d2fe4441662435e55f2dc481bf94a2729b9d6a48.tar.bz2
gerbonara-d2fe4441662435e55f2dc481bf94a2729b9d6a48.zip
Merge pull request #3 from garretfick/merge-curtacircuitos
Merge curtacircuitos
Diffstat (limited to 'gerber/__main__.py')
-rw-r--r--gerber/__main__.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/gerber/__main__.py b/gerber/__main__.py
index 71e3bfc..6643b54 100644
--- a/gerber/__main__.py
+++ b/gerber/__main__.py
@@ -16,24 +16,24 @@
# the License.
if __name__ == '__main__':
- from .common import read
- from .render import GerberSvgContext
+ from gerber.common import read
+ from gerber.render import GerberCairoContext
import sys
if len(sys.argv) < 2:
- print >> sys.stderr, "Usage: python -m gerber <filename> <filename>..."
+ sys.stderr.write("Usage: python -m gerber <filename> <filename>...\n")
sys.exit(1)
- ctx = GerberSvgContext()
- ctx.set_alpha(0.95)
+ ctx = GerberCairoContext()
+ ctx.alpha = 0.95
for filename in sys.argv[1:]:
- print "parsing %s" % filename
+ print("parsing %s" % filename)
if 'GTO' in filename or 'GBO' in filename:
- ctx.set_color((1, 1, 1))
- ctx.set_alpha(0.8)
+ ctx.color = (1, 1, 1)
+ ctx.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)
+ ctx.color = (0.2, 0.2, 0.75)
+ ctx.alpha = 0.8
gerberfile = read(filename)
gerberfile.render(ctx)