2019-02-20 20:53:14 +01:00
|
|
|
from DisplayAdapter import DisplayAdapter
|
|
|
|
|
|
|
|
class ImageFileAdapter (DisplayAdapter):
|
|
|
|
"""Saves design to an image file, can be used for debugging"""
|
|
|
|
def __init__ (self, file_path = ""):
|
2019-02-28 15:17:43 +01:00
|
|
|
super(ImageFileAdapter, self).__init__(384, 640)
|
2019-02-20 20:53:14 +01:00
|
|
|
self.file_path = file_path
|
|
|
|
|
|
|
|
def render (self, design):
|
2019-02-28 15:17:43 +01:00
|
|
|
design.get_image().save(self.file_path + 'design_exported.png')
|
2019-02-20 20:53:14 +01:00
|
|
|
|
|
|
|
def calibrate (self):
|
|
|
|
pass
|