diff options
author | Garret Fick <garret@fickworkshop.com> | 2016-05-19 23:28:02 +0800 |
---|---|---|
committer | Garret Fick <garret@fickworkshop.com> | 2016-05-19 23:28:02 +0800 |
commit | d1d112f2f152784ead18bfa25c70caf210020666 (patch) | |
tree | 4d3416fd759f7f0a8519e28971e4c4bf37cdc01d /gerber | |
parent | 74c638c7181e7a8ca4d0f791545bbf5db8b86c2a (diff) | |
parent | 199a0f3d3c5d4dbbc4ac6e8d1b4548523e44f00f (diff) | |
download | gerbonara-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')
-rw-r--r-- | gerber/render/cairo_backend.py | 7 |
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 +
|