added support for full dynamic sizing of instruction blocks
This commit is contained in:
@@ -25,9 +25,15 @@ class Function_scope(Iterable):
|
||||
def get_height(self) -> int:
|
||||
h = 0.0
|
||||
for inst in self.contents:
|
||||
h += inst.getblksize()
|
||||
h += inst.getblkheight()
|
||||
return int(h)
|
||||
|
||||
def get_width(self) -> int:
|
||||
w = 0.0
|
||||
for inst in self.contents:
|
||||
w = max(w, inst.getblkwidth())
|
||||
return int(max(200, w))
|
||||
|
||||
def __iter__(self):
|
||||
return self.contents.__iter__()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user