Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/thirdparty/cairoplot-trunk/trunk/cairoplot/handlers/svg.py
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/cairoplot-trunk/trunk/cairoplot/handlers/svg.py')
-rwxr-xr-xthirdparty/cairoplot-trunk/trunk/cairoplot/handlers/svg.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/thirdparty/cairoplot-trunk/trunk/cairoplot/handlers/svg.py b/thirdparty/cairoplot-trunk/trunk/cairoplot/handlers/svg.py
new file mode 100755
index 0000000..032fdc8
--- /dev/null
+++ b/thirdparty/cairoplot-trunk/trunk/cairoplot/handlers/svg.py
@@ -0,0 +1,12 @@
+
+import cairo
+from .vector import VectorHandler as _VectorHandler
+
+class SVGHandler(_VectorHandler):
+ """Handler to create plots that output to svg files."""
+
+ def __init__(self, filename, width, height):
+ """Creates a surface to be used by Cairo."""
+ _VectorHandler.__init__(self, None, width, height)
+ self.surface = cairo.SVGSurface(filename, width, height)
+