This commit is contained in:
weckyy702
2020-12-22 20:43:31 +01:00
parent 48cb0043cd
commit fa69aff003
4 changed files with 9 additions and 27 deletions

View File

@@ -1,7 +1,9 @@
from Iinstruction import Iinstruction
import interpret_source as itp
import logging
from typing import List
from Iinstruction import Iinstruction
import logging
import interpret_source as itp
import code_to_image as cti
class NassiShneidermanDiagram:
@@ -26,7 +28,7 @@ class NassiShneidermanDiagram:
cti.NSD_init(x_size, 5000)
x, y, x_sz = 0, 0, x_size
for _k, instruction in self.instructions.items():
x, y = instruction.to_image(x, y, x_sz, 750)
x, y = instruction.to_image(x, y, x_sz, 800)
cti.NSD_save(filename)
def load_from_file(self, filepath:str):
@@ -41,9 +43,6 @@ class NassiShneidermanDiagram:
if __name__ == "__main__":
#for debugging
from Iinstruction import *
NSD = NassiShneidermanDiagram(True)
NSD.load_from_file("res/input/input.java")

View File

@@ -10,27 +10,10 @@ while(shouldNiet()) {
niet10();
niet11();
}
if(if13) {
niet14();
niet13();
}
niet15();
if(if16) {
niet17();
niet18();
} else {
niet20();
niet21();
if(if22) {
niet23()
}
}
} else {
niet27();
niet28();
}
niet30();
}
niet32();
niet33();
niet16();
// drehe("links");
// while(huegelVorhanden("rechts"))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 29 KiB