summaryrefslogtreecommitdiff
path: root/gerber/render/cairo_backend.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2015-10-14 15:37:02 -0300
committerPaulo Henrique Silva <ph.silva@gmail.com>2015-10-14 15:37:02 -0300
commit944c8329222b8c1166a4952df0ca553cbec71505 (patch)
treec9b4263852cf6e8a2f4003ac746011424d1edc69 /gerber/render/cairo_backend.py
parentb81c9d4bf96845ced3495eb158ec3a3c9e4dce3d (diff)
parent10d9028e1fdf7431baee73c7f1474d2134bac5fa (diff)
downloadgerbonara-944c8329222b8c1166a4952df0ca553cbec71505.tar.gz
gerbonara-944c8329222b8c1166a4952df0ca553cbec71505.tar.bz2
gerbonara-944c8329222b8c1166a4952df0ca553cbec71505.zip
Merge pull request #41 from curtacircuitos/read_from_memory
Read from memory
Diffstat (limited to 'gerber/render/cairo_backend.py')
-rw-r--r--gerber/render/cairo_backend.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gerber/render/cairo_backend.py b/gerber/render/cairo_backend.py
index a97e552..345f331 100644
--- a/gerber/render/cairo_backend.py
+++ b/gerber/render/cairo_backend.py
@@ -172,3 +172,9 @@ class GerberCairoContext(GerberContext):
else:
self.surface.write_to_png(filename)
+
+ def dump_svg_str(self):
+ self.surface.finish()
+ self.surface_buffer.flush()
+ return self.surface_buffer.read()
+ \ No newline at end of file