From ecdf859b6ce481abfd530425dcf6f0f764bd0001 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 28 Dec 2021 03:01:00 +0000 Subject: CTAN sync 202112280300 --- graphics/asymptote/GUI/xasyTransform.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'graphics/asymptote/GUI/xasyTransform.py') diff --git a/graphics/asymptote/GUI/xasyTransform.py b/graphics/asymptote/GUI/xasyTransform.py index 928e9011f0..cb70bf1edb 100644 --- a/graphics/asymptote/GUI/xasyTransform.py +++ b/graphics/asymptote/GUI/xasyTransform.py @@ -1,24 +1,24 @@ #!/usr/bin/env python3 -import xasy2asy as x2a -import PyQt5.QtGui as Qg -import PyQt5.QtCore as Qc -import numpy as np +import xasy2asy as xasy2asy +import PyQt5.QtGui as QtGui +import PyQt5.QtCore as QtCore +import numpy as numpy import math class xasyTransform: @classmethod def makeRotTransform(cls, theta, origin): - if isinstance(origin, Qc.QPointF) or isinstance(origin, Qc.QPoint): + if isinstance(origin, QtCore.QPointF) or isinstance(origin, QtCore.QPoint): origin = (origin.x(), origin.y()) rotMat = (math.cos(theta), -math.sin(theta), math.sin(theta), math.cos(theta)) - shift = x2a.asyTransform((0, 0, 1 - rotMat[0], -rotMat[1], -rotMat[2], 1 - rotMat[3])) * origin - return x2a.asyTransform((shift[0], shift[1], rotMat[0], rotMat[1], rotMat[2], rotMat[3])) + shift = xasy2asy.asyTransform((0, 0, 1 - rotMat[0], -rotMat[1], -rotMat[2], 1 - rotMat[3])) * origin + return xasy2asy.asyTransform((shift[0], shift[1], rotMat[0], rotMat[1], rotMat[2], rotMat[3])) @classmethod def makeScaleTransform(cls, sx, sy, origin): - if isinstance(origin, Qc.QPointF) or isinstance(origin, Qc.QPoint): + if isinstance(origin, QtCore.QPointF) or isinstance(origin, QtCore.QPoint): origin = (origin.x(), origin.y()) - shiftMat = x2a.asyTransform((0, 0, 1 - sx, 0, 0, 1 - sy)) * origin - return x2a.asyTransform((shiftMat[0], shiftMat[1], sx, 0, 0, sy)) + shiftMat = xasy2asy.asyTransform((0, 0, 1 - sx, 0, 0, 1 - sy)) * origin + return xasy2asy.asyTransform((shiftMat[0], shiftMat[1], sx, 0, 0, sy)) -- cgit v1.2.3