(self, x, y)
return x, y
Window coordinates ==> world coordinates.
Window coordinates ==> world coordinates.
Window coordinates == > world coordinates .
def normalize_position(self, x, y):
        """Window coordinates ==> world coordinates."""
        if not hasattr(self.paint_manager, 'renderer'):
            return (0, 0)
        vx, vy = self.paint_manager.renderer.viewport
        x = -vx + 2 * vx * x / float(self.w)
        y = -(-vy + 2 * vy * y / float(self.h))
        return x, y
def normalize_position ( self , x , y ) : if not hasattr ( self . paint_manager , 'renderer' ) : return ( 0 , 0 ) vx , vy = self . paint_manager . renderer . viewport x = - vx + 2 * vx * x / float ( self . w ) y = - ( - vy + 2 * vy * y / float ( self . h ) ) return x , y