diff options
-rw-r--r-- | src/ui_widgets.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ui_widgets.py b/src/ui_widgets.py index 867764d..33a09a1 100644 --- a/src/ui_widgets.py +++ b/src/ui_widgets.py @@ -117,6 +117,12 @@ class EllipseWidget(QWidget): P.translate(cx, cy) P.scale(1, -1) + # FIXME: wtf... + if type(self.ellipse.alpha) is np.ndarray: + self.ellipse.alpha = self.ellipse.alpha[0] + if type(self.ellipse.theta) is np.ndarray: + self.ellipse.theta = self.ellipse.theta[0] + # radii P.setPen(Pens.radii) csa = np.array([np.cos(self.ellipse.alpha), np.sin(self.ellipse.alpha)]) @@ -159,9 +165,9 @@ class EllipseWidget(QWidget): T = np.dot(np.array([[0, 1], [-1, 0]]), N) ax = x - N * 5 + T * 5 - P.drawLine(x[0], x[1], ax[0], ax[1]) + P.drawLine(int(x[0]), int(x[1]), int(ax[0]), int(ax[1])) ax = x - N * 5 - T * 5 - P.drawLine(x[0], x[1], ax[0], ax[1]) + P.drawLine(int(x[0]), int(x[1]), int(ax[0]), int(ax[1])) path.closeSubpath() P.drawPath(path) |