Liang-Barsky line clipping algorithm.