This commit is contained in:
oleting
2020-12-27 20:24:44 +01:00
2 changed files with 5 additions and 7 deletions

View File

@@ -24,7 +24,7 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem. If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):** **Desktop (please complete the following information):**
- OS: [e.g. iOS] - OS: [e.g. MacOS]
- Browser [e.g. chrome, safari] - Browser [e.g. chrome, safari]
- Version [e.g. 22] - Version [e.g. 22]

View File

@@ -1,18 +1,16 @@
import logging
import os import os
from typing import Optional
from interpreter.NassiShneidermann import NassiShneidermanDiagram from interpreter.NassiShneidermann import NassiShneidermanDiagram
from draw.Iinstruction import * from draw.Iinstruction import *
def nassi(filepath: str, output_path: str, outputname, gui, font_filepath=None): def nassi(filepath: str, output_path: str, outputname: str, gui, font_filepath: Optional[str]=None):
NSD = NassiShneidermanDiagram(gui.debug_mode) NSD = NassiShneidermanDiagram(gui.debug_mode)
# if font_filepath is None:
# pass
# else:
# if font_filepath is not None or font_filepath != "":
if font_filepath != None: if font_filepath != None:
NSD.set_font(str(font_filepath)) NSD.set_font(font_filepath)
NSD.load_from_file(filepath) NSD.load_from_file(filepath)
NSD.convert_to_image(output_path, outputname, 500) NSD.convert_to_image(output_path, outputname, 500)