Open Syntaf opened 9 years ago
extractdialog
now calculates the shape's aspect ratio and produces a window based on the aspect ratio. The current preset ratios are arbitrary and need to further adjusted to eliminate skewing. Also, there's a bug when clicking on anything besides the close button of the subplot.
The bug appears to be coming from self.canvas.show()
on line 178 in extractdialog.py
. The program for some reason suspends itself at that line.
An idea may be to refactor extract dialog so we have access to the display coordinates of shapes, and we can simply scale that shape into the extract window. This would required some calls to the matplotlib
backend and other such. However this is not a current big issue so this can remain unimplemented until we finish our other business
Here's how I believe the current solution should work:
ExtractDialog
to be able to receive the coordinates of the shapeExtractDialog
windowFigure
object to expand to fit the windowImplementation of this feature should be done on aspect_ratio
The current extraction tool displays a subplot containing only the bounds given by the shape selected. The problem is that with narrow shapes, the image is very skewed due to a fixed window size in
ExtractDialog
. If the window could resize to some scale of the shape during the__init__
function, that avoid this problem.To view what problem I'm talking about: