Source

vanhoek / vanhoek / backends / png_writer.py

Full commit
1
2
3
4
5
6
7
8
9
from .backend_base import BackendBase

class PNGWriter(BackendBase):
    def __init__(self, format_string = "slide_%04i.png"):
        self.format_string = format_string

    def draw(self, slide, i):
        surface = BackendBase.draw(self, slide, i)
        surface.write_to_png(self.format_string % i)