Fixed and improved path handling
This commit is contained in:
parent
08cc2b7daa
commit
64b704c10f
1 changed files with 3 additions and 0 deletions
|
@ -1,10 +1,13 @@
|
|||
from DisplayAdapter import DisplayAdapter
|
||||
from Assets import path
|
||||
|
||||
class ImageFileAdapter (DisplayAdapter):
|
||||
"""Saves design to an image file, can be used for debugging"""
|
||||
def __init__ (self, file_path = ""):
|
||||
super(ImageFileAdapter, self).__init__(384, 640)
|
||||
self.file_path = file_path
|
||||
if self.file_path == "":
|
||||
self.file_path = path
|
||||
|
||||
def render (self, design):
|
||||
design.get_image().save(self.file_path + 'design_exported.png')
|
||||
|
|
Loading…
Reference in a new issue