From 83e498b8917e0b3287871c27a4acc95634acab2e Mon Sep 17 00:00:00 2001 From: Ingo Becker Date: Fri, 19 Jun 2020 16:23:32 +0200 Subject: PT/PR165: Fix pycairo incompatibility --- gerbonara/gerber/render/cairo_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gerbonara') diff --git a/gerbonara/gerber/render/cairo_backend.py b/gerbonara/gerber/render/cairo_backend.py index e1d1408..03366f6 100644 --- a/gerbonara/gerber/render/cairo_backend.py +++ b/gerbonara/gerber/render/cairo_backend.py @@ -23,7 +23,6 @@ except ImportError: from operator import mul import tempfile -import copy import os from .render import GerberContext, RenderSettings @@ -532,7 +531,8 @@ class GerberCairoContext(GerberContext): def new_render_layer(self, color=None, mirror=False): size_in_pixels = self.scale_point(self.size_in_inch) - matrix = copy.copy(self._xform_matrix) + m = self._xform_matrix + matrix = cairo.Matrix(m.xx, m.yx, m.xy, m.yy, m.x0, m.y0) layer = cairo.SVGSurface(None, size_in_pixels[0], size_in_pixels[1]) ctx = cairo.Context(layer) -- cgit