(self, p1, p2)
Overload to use ViewBox.mapToView instead of mapRectFromParent
        mapRectFromParent (from Qt) uses QTransform.invert() which has
        floating-point issues and can't invert the matrix with large
        coefficients. ViewBox.mapToView uses invertQTransform from pyqtgraph.

        This code, except for first three lines, are copied from the overloaded
        method.
Overload to use ViewBox.mapToView instead of mapRectFromParent
        mapRectFromParent (from Qt) uses QTransform.invert() which has
        floating-point issues and can't invert the matrix with large
        coefficients. ViewBox.mapToView uses invertQTransform from pyqtgraph.
Overload to use ViewBox . mapToView instead of mapRectFromParent mapRectFromParent ( from Qt ) uses QTransform . invert () which has floating - point issues and can t invert the matrix with large coefficients . ViewBox . mapToView uses invertQTransform from pyqtgraph .
def updateScaleBox(self, p1, p2):
        """
        Overload to use ViewBox.mapToView instead of mapRectFromParent
        mapRectFromParent (from Qt) uses QTransform.invert() which has
        floating-point issues and can't invert the matrix with large
        coefficients. ViewBox.mapToView uses invertQTransform from pyqtgraph.

        This code, except for first three lines, are copied from the overloaded
        method.
        """
        p1 = self.mapToView(p1)
        p2 = self.mapToView(p2)
        r = QRectF(p1, p2)
        self.rbScaleBox.setPos(r.topLeft())
        tr = QTransform.fromScale(r.width(), r.height())
        self.rbScaleBox.setTransform(tr)
        self.rbScaleBox.show()
def updateScaleBox ( self , p1 , p2 ) : p1 = self . mapToView ( p1 ) p2 = self . mapToView ( p2 ) r = QRectF ( p1 , p2 ) self . rbScaleBox . setPos ( r . topLeft ( ) ) tr = QTransform . fromScale ( r . width ( ) , r . height ( ) ) self . rbScaleBox . setTransform ( tr ) self . rbScaleBox . show ( )