It should be the same as most polygonal clipping algorithms.
Test if endpoints of the line are inside the polygon. If both are (and since your polygon is convex), no change. If one is, find the intersection and clip. If both are out, test if there are any intersections, and if so, use the intersections points to clip the line.
Oh, I've got a good answer to the question.
> What is the algorithm for triangular clip ?
It should be the same as most polygonal clipping algorithms.
Test if endpoints of the line are inside the polygon. If both are (and since your polygon is convex), no change. If one is, find the intersection and clip. If both are out, test if there are any intersections, and if so, use the intersections points to clip the line.