summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gerber/__main__.py2
-rw-r--r--gerber/render/svgwrite_backend.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/gerber/__main__.py b/gerber/__main__.py
index a792182..195973b 100644
--- a/gerber/__main__.py
+++ b/gerber/__main__.py
@@ -21,7 +21,7 @@ if __name__ == '__main__':
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()
diff --git a/gerber/render/svgwrite_backend.py b/gerber/render/svgwrite_backend.py
index a88abfe..f8136e0 100644
--- a/gerber/render/svgwrite_backend.py
+++ b/gerber/render/svgwrite_backend.py
@@ -109,7 +109,7 @@ class GerberSvgContext(GerberContext):
self.dwg.add(acircle)
def _render_rectangle(self, rectangle, color):
- center = map(mul, rectangle.position, self.scale)
+ center = tuple(map(mul, rectangle.position, self.scale))
size = tuple(map(mul, (rectangle.width, rectangle.height), map(abs, self.scale)))
insert = center[0] - size[0] / 2., center[1] - size[1] / 2.
arect = self.dwg.rect(insert=insert, size=size,