def xDP2LP(dpX, dptZero, lPix = 1.0):
    """Convert device coordinates into logical coordinates
        dpX   - x device coordinate
        dptZero - device coordinates of logical 0,0 point
        lPix  - zoom value, number of logical points inside one device point (aka pixel)
        return coordinate in logical coordinates
    """
    return (dpX - dptZero.x) * lPix