From 5430fa6738b74f324c47c947477dd5b779db5d1c Mon Sep 17 00:00:00 2001 From: Hamilton Kibbe Date: Tue, 22 Dec 2015 10:18:51 -0500 Subject: Python3 fix --- gerber/render/cairo_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gerber') 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: -- cgit