Created ImageFileAdapter for debuging.
This commit is contained in:
parent
679fed425d
commit
2785542aa0
1 changed files with 13 additions and 0 deletions
13
Calendar/ImageFileAdapter.py
Normal file
13
Calendar/ImageFileAdapter.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
from DisplayAdapter import DisplayAdapter
|
||||||
|
|
||||||
|
class ImageFileAdapter (DisplayAdapter):
|
||||||
|
"""Saves design to an image file, can be used for debugging"""
|
||||||
|
def __init__ (self, file_path = ""):
|
||||||
|
super(ImageFileAdapter, self).__init__(640, 384)
|
||||||
|
self.file_path = file_path
|
||||||
|
|
||||||
|
def render (self, design):
|
||||||
|
design.save(self.file_path + 'design_exported.png')
|
||||||
|
|
||||||
|
def calibrate (self):
|
||||||
|
pass
|
Loading…
Reference in a new issue