diff options
Diffstat (limited to 'thirdparty/cairoplot-trunk/trunk/cairoplot/handlers/svg.py')
-rwxr-xr-x | thirdparty/cairoplot-trunk/trunk/cairoplot/handlers/svg.py | 12 |
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) + |