Seems like these functions don't work properly in libnix13.
Implement line clipping.