class_docstr: Transform that can always be represented as a combination of 3 matrices: scale * rotate * translate
  This transform has no shear; angles are always preserved.
class_docstr_tok: ["Transform","that","can","always","be","represented","as","a","combination","of","3","matrices",":","scale","*","rotate","*","translate","This","transform","has","no","shear",";","angles","are","always","preserved","."]
code: def setFromQTransform(self, tr):
      p1 = Point(tr.map(0.0, 0.0))
      p2 = Point(tr.map(1.0, 0.0))
      p3 = Point(tr.map(0.0, 1.0))
  
      dp2 = Point(p2 - p1)
      dp3 = Point(p3 - p1)
  
      ## detect flipped axes
      if dp2.angle(dp3, units="radians") > 0:
          da = 0
          sy = -1.0
      else:
          da = 0
          sy = 1.0
  
      self._state = {
          "pos": Point(p1),
          "scale": Point(dp2.length(), dp3.length() * sy),
          "angle": degrees(atan2(dp2[1], dp2[0])) + da,
      }
      self.update()
  
imports: from math import atan2, degrees
  import numpy
  from .Point import Point
  from .Qt import QtGui
  from .None import SRTTransform3D
label_desc: Use image node_id 6 for calling the SRTTransform obj's underlying member method code with example usage: obj.setFromQTransform(tr) without return types