summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/GUI/xasy2asy.py
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-01-02 16:31:31 +0000
committerKarl Berry <karl@freefriends.org>2021-01-02 16:31:31 +0000
commit6457cd3f6e21e23e21db6dafff021d17f5457567 (patch)
tree08f169333e47c5fc1c50e828cf3a0f50bdf9b508 /Build/source/utils/asymptote/GUI/xasy2asy.py
parentdc2504a4c02af0ec2fff00e6b833c6143a06b4cd (diff)
asy 2.68 sources
git-svn-id: svn://tug.org/texlive/trunk@57291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/GUI/xasy2asy.py')
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasy2asy.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/Build/source/utils/asymptote/GUI/xasy2asy.py b/Build/source/utils/asymptote/GUI/xasy2asy.py
index 4b2d0274f74..12bccb453cf 100755
--- a/Build/source/utils/asymptote/GUI/xasy2asy.py
+++ b/Build/source/utils/asymptote/GUI/xasy2asy.py
@@ -716,7 +716,7 @@ class xasyItem(Qc.QObject):
image = Qg.QImage(file)
elif fileformat == 'svg':
if containsClip:
- image = xs.SvgObject(file)
+ image = xs.SvgObject(self.asyengine.tempDirName+file)
else:
image = Qs.QSvgRenderer(file)
assert image.isValid()
@@ -826,7 +826,7 @@ class xasyItem(Qc.QObject):
for i in range(len(imageInfos)):
box, key, localCount, useClip = imageInfos[i]
l, b, r, t = [float(a) for a in box.split()]
- name = "{:s}_{:d}.{:s}".format(self.asyengine.tempDirName, i, fileformat)
+ name = "_{:d}.{:s}".format(i, fileformat)
self.imageHandleQueue.put((name, fileformat, (l, -t, r, -b), i, key, localCount, useClip))
@@ -873,12 +873,15 @@ class xasyItem(Qc.QObject):
n += 1
- if text == "Error\n":
- self.imageHandleQueue.put(("ERROR", fin.readline()))
- else:
- render()
+ if raw_text != "Error\n":
+ if text == "Error\n":
+ self.imageHandleQueue.put(("ERROR", fin.readline()))
+ else:
+ render()
- self.asy2psmap = asyTransform(xu.listize(fin.readline().rstrip(),float))
+ self.asy2psmap = asyTransform(xu.listize(fin.readline().rstrip(),float))
+ else:
+ self.asy2psmap = identity()
self.imageHandleQueue.put((None,))
self.asyfied = True