diff options
author | Norbert Preining <norbert@preining.info> | 2023-01-24 03:02:57 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-01-24 03:02:57 +0000 |
commit | b06c6695162b493aeec3b594c6beb518c15c98ba (patch) | |
tree | 0c1dc3cfc73ea789d6bdc4673d776f3ef652d6d8 /graphics/asymptote/GUI | |
parent | 4451a2090261307c963209bc65fea9fde4eceeea (diff) |
CTAN sync 202301240302
Diffstat (limited to 'graphics/asymptote/GUI')
-rw-r--r-- | graphics/asymptote/GUI/ContextWindow.py | 4 | ||||
-rw-r--r-- | graphics/asymptote/GUI/Window1.py | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/graphics/asymptote/GUI/ContextWindow.py b/graphics/asymptote/GUI/ContextWindow.py index 114ec5acde..2711cfeca7 100644 --- a/graphics/asymptote/GUI/ContextWindow.py +++ b/graphics/asymptote/GUI/ContextWindow.py @@ -173,8 +173,8 @@ class AnotherWindow(Qw.QWidget): #None, {Arrow, ArcArrow} x {(),(SimpleHead),(HookHead),(TeXHead)} if isinstance(self.shape, x2a.xasyShape): if i != 0: - if self.newShape == x2a.asyArrow: - self.newShape = self.newShape.arrowify(arrowhead=i) + if isinstance(self.newShape,x2a.asyArrow): + self.newShape.arrowSettings["active"] = i else: self.newShape = self.shape.arrowify(arrowhead=i) else: diff --git a/graphics/asymptote/GUI/Window1.py b/graphics/asymptote/GUI/Window1.py index a21137a023..21d9691e64 100644 --- a/graphics/asymptote/GUI/Window1.py +++ b/graphics/asymptote/GUI/Window1.py @@ -1949,7 +1949,7 @@ class MainWindow1(Qw.QMainWindow): preCanvas.setPen(minorGridCol) self.makePenCosmetic(preCanvas) for xMinor in range(1, minorGridCount + 1): - xCoord = x + ((xMinor / (minorGridCount + 1)) * majorGrid) + xCoord = round(x + ((xMinor / (minorGridCount + 1)) * majorGrid)) preCanvas.drawLine(Qc.QLine(xCoord, -9999, xCoord, 9999)) preCanvas.drawLine(Qc.QLine(-xCoord, -9999, -xCoord, 9999)) @@ -1957,20 +1957,22 @@ class MainWindow1(Qw.QMainWindow): preCanvas.setPen(minorGridCol) self.makePenCosmetic(preCanvas) for yMinor in range(1, minorGridCount + 1): - yCoord = y + ((yMinor / (minorGridCount + 1)) * majorGrid) + yCoord = round(y + ((yMinor / (minorGridCount + 1)) * majorGrid)) preCanvas.drawLine(Qc.QLine(-9999, yCoord, 9999, yCoord)) preCanvas.drawLine(Qc.QLine(-9999, -yCoord, 9999, -yCoord)) preCanvas.setPen(majorGridCol) self.makePenCosmetic(preCanvas) - preCanvas.drawLine(Qc.QLine(-9999, y, 9999, y)) - preCanvas.drawLine(Qc.QLine(-9999, -y, 9999, -y)) + roundY = round(y) + preCanvas.drawLine(Qc.QLine(-9999, roundY, 9999, roundY)) + preCanvas.drawLine(Qc.QLine(-9999, -roundY, 9999, -roundY)) for x in np.arange(0, 2 * x_range + 1, majorGrid): preCanvas.setPen(majorGridCol) self.makePenCosmetic(preCanvas) - preCanvas.drawLine(Qc.QLine(x, -9999, x, 9999)) - preCanvas.drawLine(Qc.QLine(-x, -9999, -x, 9999)) + roundX = round(x) + preCanvas.drawLine(Qc.QLine(roundX, -9999, roundX, 9999)) + preCanvas.drawLine(Qc.QLine(-roundX, -9999, -roundX, 9999)) def drawPolarGrid(self, preCanvas): center = Qc.QPointF(0, 0) |