'// must test to see if each endpoint is on the same side of one of
'// the bounding planes created by each clipping region boundary
If (((X1 < poly_clip_min_x) And (X2 < poly_clip_min_x)) Or ((X1 > poly_clip_max_x) And (X2 > poly_clip_max_x)) Or ((Y1 < poly_clip_min_y) And (Y2 < poly_clip_min_y)) Or ((Y1 > poly_clip_max_y) And (Y2 > poly_clip_max_y))) Then
ClipReturn = False
Exit Sub 'return(0); no need to draw line
End If 'invisible
'// if we got here we have the special case where the line cuts into and