diff options
Diffstat (limited to 'cairoplot/handlers/ps.py')
-rwxr-xr-x | cairoplot/handlers/ps.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cairoplot/handlers/ps.py b/cairoplot/handlers/ps.py new file mode 100755 index 0000000..7a77781 --- /dev/null +++ b/cairoplot/handlers/ps.py @@ -0,0 +1,12 @@ + +import cairo +from .vector import VectorHandler as _VectorHandler + +class PSHandler(_VectorHandler): + """Handler to create plots that output to PostScript files.""" + + def __init__(self, filename, width, height): + """Creates a surface to be used by Cairo.""" + _VectorHandler.__init__(self, None, width, height) + self.surface = cairo.PSSurface(filename, width, height) + |