From 199a0f3d3c5d4dbbc4ac6e8d1b4548523e44f00f Mon Sep 17 00:00:00 2001 From: Qau Lau Date: Fri, 8 Apr 2016 20:02:04 +0800 Subject: Update cairo_backend.py If cairo module import error use cairocffi --- gerber/render/cairo_backend.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gerber') diff --git a/gerber/render/cairo_backend.py b/gerber/render/cairo_backend.py index d895e5c..1d168ca 100644 --- a/gerber/render/cairo_backend.py +++ b/gerber/render/cairo_backend.py @@ -17,7 +17,10 @@ from .render import GerberContext -import cairo +try: + import cairo +except ImportError: + import cairocffi as cairo from operator import mul import math @@ -233,4 +236,4 @@ class GerberCairoContext(GerberContext): self.surface.finish() self.surface_buffer.flush() return self.surface_buffer.read() - \ No newline at end of file + -- cgit