コード例 #1
0
 public Circle(Point c, int r, FormPaint form)
 {
     f           = form;
     graphicType = "Circle";
     center      = c;
     radius      = r;
     points      = Points();
 }
コード例 #2
0
 public Ellipse(Point c, int x, int y, FormPaint form)
 {
     f           = form;
     graphicType = "Ellipse";
     center      = c;
     rx          = x;
     ry          = y;
     points      = Points();
 }
コード例 #3
0
 public DashedRectangle(int tx, int ty, int w, int h, FormPaint form)
 {
     f           = form;
     graphicType = "DashedRectangle";
     x           = tx;
     y           = ty;
     width       = w;
     height      = h;
     points      = Points();
 }
コード例 #4
0
 // 多边形的几个顶点
 public Polygon(List <Point> lp, FormPaint form)
 {
     f           = form;
     graphicType = "Polygon";
     // 由于我们的多边形在构造时是单击记录一个顶点
     // 最后一个顶点是以双击来记录的
     // 但是这样子经常会导致最后一个点被记录两次,具体原因我还没搞清楚
     // 因此为了避免之后的裁剪出现问题,我们在这里就要清除重复的点
     // make a deep copy of the list
     vertices = Helper.RemoveDuplicatedPoint(lp);
     // 多边形边界上的点
     points = Points();
 }
コード例 #5
0
 public BresenhamLine(Point pa, Point pb, FormPaint form) : base(pa, pb)
 {
     graphicType = "Bresenham";
     f           = form;
     points      = Points();
 }
コード例 #6
0
 public BresenhamLine(List <Point> lp, FormPaint form) : base(lp)
 {
     graphicType = "Bresenham";
     f           = form;
     points      = Points();
 }
コード例 #7
0
 public Block(List <Point> l, FormPaint form)
 {
     f           = form;
     graphicType = "Block";
     points      = l;
 }
コード例 #8
0
 public Bspline(List <Point> lp, FormPaint form) : base(lp)
 {
     graphicType = "Bspline";
     f           = form;
 }
コード例 #9
0
 public Bezier(List <Point> lp, FormPaint form) : base(lp)
 {
     graphicType = "Bezier";
     f           = form;
 }
コード例 #10
0
 public DDALine(Point pa, Point pb, FormPaint form) : base(pa, pb)
 {
     graphicType = "DDA";
     f           = form;
     points      = Points();
 }
コード例 #11
0
 public DDALine(List <Point> lp, FormPaint form) : base(lp)
 {
     graphicType = "DDA";
     f           = form;
     points      = Points();
 }