二维图形裁剪-3 //当直线和左边界有交点 if(LEFT&code!=0 { x=XL; y=y1+(y2-y1(XL-x1/(x2-x1; } //当直线和右边界有交点 else if(RIGHT&code!=0 { x=XR; y=y1+(y2-y1(XR-x1/(x2-x1; } //当直线和底边界有交点 else if(BOTTOM&code!=0 { y=YB; x=x1+(x2-x