summaryrefslogtreecommitdiff
path: root/gerber/render/cairo_backend.py
diff options
context:
space:
mode:
authorGarret Fick <garret@fickworkshop.com>2016-05-19 23:28:02 +0800
committerGarret Fick <garret@fickworkshop.com>2016-05-19 23:28:02 +0800
commitd1d112f2f152784ead18bfa25c70caf210020666 (patch)
tree4d3416fd759f7f0a8519e28971e4c4bf37cdc01d /gerber/render/cairo_backend.py
parent74c638c7181e7a8ca4d0f791545bbf5db8b86c2a (diff)
parent199a0f3d3c5d4dbbc4ac6e8d1b4548523e44f00f (diff)
downloadgerbonara-d1d112f2f152784ead18bfa25c70caf210020666.tar.gz
gerbonara-d1d112f2f152784ead18bfa25c70caf210020666.tar.bz2
gerbonara-d1d112f2f152784ead18bfa25c70caf210020666.zip
Merge pull request #3 from qaulau/patch-2
Update cairo_backend.py
Diffstat (limited to 'gerber/render/cairo_backend.py')
-rw-r--r--gerber/render/cairo_backend.py7
1 files changed, 5 insertions, 2 deletions
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
+