diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-12-22 10:18:51 -0500 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-12-22 10:18:51 -0500 |
commit | 5430fa6738b74f324c47c947477dd5b779db5d1c (patch) | |
tree | ac4af97d23f1892c918f46bc501fb64925373036 /gerber/render | |
parent | 6f876edd09d9b81649691e529f85653f14b8fd1c (diff) | |
download | gerbonara-5430fa6738b74f324c47c947477dd5b779db5d1c.tar.gz gerbonara-5430fa6738b74f324c47c947477dd5b779db5d1c.tar.bz2 gerbonara-5430fa6738b74f324c47c947477dd5b779db5d1c.zip |
Python3 fix
Diffstat (limited to 'gerber/render')
-rw-r--r-- | gerber/render/cairo_backend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gerber/render/cairo_backend.py b/gerber/render/cairo_backend.py index 7acf29a..c3e9ac2 100644 --- a/gerber/render/cairo_backend.py +++ b/gerber/render/cairo_backend.py @@ -17,7 +17,7 @@ import cairocffi as cairo
-from operator import mul, div
+from operator import mul
import math
import tempfile
@@ -45,7 +45,7 @@ class GerberCairoContext(GerberContext): def set_bounds(self, bounds, new_surface=False):
origin_in_inch = (bounds[0][0], bounds[1][0])
size_in_inch = (abs(bounds[0][1] - bounds[0][0]), abs(bounds[1][1] - bounds[1][0]))
- size_in_pixels = map(mul, size_in_inch, self.scale)
+ size_in_pixels = tuple(map(mul, size_in_inch, self.scale))
self.origin_in_inch = origin_in_inch if self.origin_in_inch is None else self.origin_in_inch
self.size_in_inch = size_in_inch if self.size_in_inch is None else self.size_in_inch
if (self.surface is None) or new_surface:
|