Python3 fix

This commit is contained in:
Hamilton Kibbe 2015-12-22 10:18:51 -05:00
parent 6f876edd09
commit 5430fa6738

View file

@ -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: