(self, fx, fy)
return x, y
Get logical to physical scale factor.
Get logical to physical scale factor.
Get logical to physical scale factor .
def _get_window_scale(self, fx, fy):
        """Get logical to physical scale factor."""
        if self._window:
            scalex, scaley, _, _ = self._window
            x, y = int(round(fx * scalex)), int(round(fy * scaley))
        else:
            x, y = int(round(fx)), int(round(fy))
        error.range_check_err(-32768, 32767, x, error.OVERFLOW)
        error.range_check_err(-32768, 32767, y, error.OVERFLOW)
        return x, y
def _get_window_scale ( self , fx , fy ) : if self . _window : scalex , scaley , _ , _ = self . _window x , y = int ( round ( fx * scalex ) ) , int ( round ( fy * scaley ) ) else : x , y = int ( round ( fx ) ) , int ( round ( fy ) ) error . range_check_err ( - 32768 , 32767 , x , error . OVERFLOW ) error . range_check_err ( - 32768 , 32767 , y , error . OVERFLOW ) return x , y