(self, x, y)
return x, y
Normalize the coordinates of a difference vector between two
        points.
Normalize the coordinates of a difference vector between two
        points.
Normalize the coordinates of a difference vector between two points .
def normalize_diff_position(self, x, y):
        """Normalize the coordinates of a difference vector between two
        points.
        """
        if not hasattr(self.paint_manager, 'renderer'):
            return (0, 0)
        vx, vy = self.paint_manager.renderer.viewport
        x = 2 * vx * x/float(self.w)
        y = -2 * vy * y/float(self.h)
        return x, y
def normalize_diff_position ( self , x , y ) : if not hasattr ( self . paint_manager , 'renderer' ) : return ( 0 , 0 ) vx , vy = self . paint_manager . renderer . viewport x = 2 * vx * x / float ( self . w ) y = - 2 * vy * y / float ( self . h ) return x , y