implement Liang-Barsky line clipping