blob: 0c4d4bc46cbd6f64015a810e309db4294d077ec0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import cairo
from .fixedsize import FixedSizeHandler as _FixedSizeHandler
class VectorHandler(_FixedSizeHandler):
"""Handler to create plots that output to vector files."""
def __init__(self, surface, *args, **kwargs):
"""Create Handler for arbitrary surfaces."""
_FixedSizeHandler.__init__(self, *args, **kwargs)
self.surface = surface
def commit(self, plot):
"""Writes plot to file."""
_FixedSizeHandler.commit(self, plot)
self.surface.finish()
|