rewrote instruction classes

This commit is contained in:
weckyy702
2021-04-25 14:21:54 +02:00
parent d8dde66d78
commit 45cb5c0467
3 changed files with 140 additions and 193 deletions

View File

@@ -39,12 +39,12 @@ class NassiShneidermanDiagram:
@staticmethod
def _save_scope(scope: Function_scope, output_path: str):
x_size = scope.get_width()
y_size = scope.get_height()
with NSD_writer(output_path, x_size, y_size):
x, y = 0, 0
width = scope.get_width()
height = scope.get_height()
with NSD_writer(output_path, width, height):
y = 0
for instruction in scope:
x, y = instruction.to_image(x, y, x_size)[0:2]
y = instruction.convert_to_image(0, y, width)
@staticmethod
def check_conflicts(filepath:str, behavoiur: Overwrite_behaviour):