Use QTransform.rotateRadians when appropriate

In a few places in the library, we are doing the conversion from radians
to degrees just so we can call QTransform.rotate(), but there is a
QTransform.rotateRadians() method which would be more suitable, thus
making it so we do not have to handle the conversions ourselves
This commit is contained in:
Ogi Moore 2021-04-23 11:22:46 -07:00
parent e1415cb3a8
commit 329423f525
2 changed files with 2 additions and 2 deletions

View File

@ -1524,7 +1524,7 @@ class Handle(UIGraphicsItem):
devPos = dt.map(QtCore.QPointF(0,0))
tr = QtGui.QTransform()
tr.translate(devPos.x(), devPos.y())
tr.rotate(degrees(va))
tr.rotateRadians(va)
return dti.map(tr.map(self.path))

View File

@ -243,7 +243,7 @@ class TargetItem(UIGraphicsItem):
tr = QtGui.QTransform()
tr.translate(devPos.x(), devPos.y())
va = atan2(v.y(), v.x())
tr.rotate(degrees(va))
tr.rotateRadians(va)
tr.scale(self.scale, self.scale)
return dti.map(tr.map(self._path))