Hole-in-the-Wall (Cyrus-Beck demo)
2,338
Published 2021-10-23
@kriblo recently highlighted Cohen-Sutherland line-clipping, which clips lines to within a rectangle. Cyrus-Beck works differently and allows clipping to within any convex polygon. You can adapt these methods to draw the bit(s) of the line outside rather than inside the shape in question.