summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/GUI/xasySvg.py
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/asymptote/GUI/xasySvg.py')
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasySvg.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Master/texmf-dist/asymptote/GUI/xasySvg.py b/Master/texmf-dist/asymptote/GUI/xasySvg.py
index a5325f9bdd6..7261dc5b691 100755
--- a/Master/texmf-dist/asymptote/GUI/xasySvg.py
+++ b/Master/texmf-dist/asymptote/GUI/xasySvg.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
-import PyQt5.QtGui as Qg
-import PyQt5.QtWidgets as Qw
+import PyQt5.QtGui as QtGui
+import PyQt5.QtWidgets as QtWidgets
import io
import subprocess
import sys
@@ -10,13 +10,13 @@ class SvgObject():
def __init__(self, file: str):
self.file=file
- def render(self, dpi:int) -> Qg.QImage:
+ def render(self, dpi:int) -> QtGui.QImage:
try:
rawDataProc = subprocess.Popen(['rsvg-convert', '--dpi-x', str(dpi),
'--dpi-y', str(dpi), self.file],
stdout=subprocess.PIPE)
except:
- Qw.QMessageBox.about(None,'rsvg-convert missing','Please install rsvg-convert version >= 2.40 in your path.')
+ QtWidgets.QMessageBox.about(None,'rsvg-convert missing','Please install rsvg-convert version >= 2.40 in your path.')
sys.exit(-1)
- return Qg.QImage.fromData(rawDataProc.stdout.read(), 'PNG')
+ return QtGui.QImage.fromData(rawDataProc.stdout.read(), 'PNG')