blob: 30838c7cf4d836c97a78255c2f6a35972084a23d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import cairo
from .vector import VectorHandler as _VectorHandler
class PDFHandler(_VectorHandler):
"""Handler to create plots that output to pdf files."""
def __init__(self, filename, width, height):
"""Creates a surface to be used by Cairo."""
_VectorHandler.__init__(self, None, width, height)
self.surface = cairo.PDFSurface(filename, width, height)
|