import java.awt.*; import java.applet.Applet; public class Sutherland_Cohen extends Applet{ int xL=100,xR=300,yB=100,yT=400;//设置四个边界 public int code(float x,float y){ int c=0; if(xxR) c=c|2;//在右边,第二位为一 if(yyT) c=c|8;//在上边,第四位为一 return c; } public vo
代码如下: using System; using System.Drawing; using System.Collections; using ZedGraph; namespace ZedGraph.Demo { /// /// Summary descr iption for SimpleDemo. /// public class InitialSampleDemo : DemoBase { public InitialSampleDemo() : base( "Code Proje
// 线段裁剪CSView.cpp : implementation of the CCSView class // #include "stdafx.h" #include "线段裁剪CS.h" #include "线段裁剪CSDoc.h" #include "线段裁剪CSView.h" #define left 200 //默认图形窗口 #define right 400 #define bottom 100 #define top 300 #define l 1 //区域编码 #defi