画橡皮线跟橡皮矩形都可以用ControlPaint中的方法搞定,但是橡皮圆怎么画?

解决方案 »

  1.   

    帮忙顶一下,
    满三了不能写出了。。
    http://topic.csdn.net/u/20090805/13/254df2c5-2356-438a-a7f5-7f9ce5a9b3b0.html
      

  2.   

    我顶,,学习了[align=center]
    ****************************************************************
                看帖一定要回,分也一定要接哦 ^_^
    ****************************************************************[/align]
      

  3.   


        using (Region RG = new Region()) { 
            Rectangle RC1 = default(Rectangle); 
            Rectangle RC2 = default(Rectangle); 
            RC1 = new Rectangle(10, 10, 100, 100); 
            RC2 = new Rectangle(20, 20, 80, 80); 
            using (Drawing2D.GraphicsPath GP = new Drawing2D.GraphicsPath()) { 
                GP.AddEllipse(RC1); 
                GP.AddEllipse(RC2); 
                RG.Intersect(GP); 
            } 
            using (Graphics G = this.CreateGraphics) { 
                G.FillRegion(Brushes.Red, RG); 
            } 
        } 
      

  4.   

               Graphics g = e.Graphics;
               SolidBrush redBrush = new SolidBrush(Color.Red);
                g.FillEllipse(redBrush, 0, 0, 100, 60);
                g.FillPie(redBrush, 100, 0, 100, 70, 30, 300);
                g.FillRectangle(redBrush, 200, 10, 100, 50);
                Point[] points =
                    {
                        new Point(0, 100),
                        new Point(20, 120),
                        new Point(50, 100),
                       new Point(60, 200),
                       new Point(30, 220),
                        new Point(180, 200),
                        new Point(20, 110),
                        new Point(0, 220)
               };
               g.FillPolygon(redBrush, points);
                Rectangle fillRect = new Rectangle(200, 100, 200, 200);
                Region fillRegion = new Region(fillRect);
                g.FillRegion(redBrush, fillRegion);
    参考
      

  5.   

    http://download.csdn.net/source/1475122这个是橡皮筋线的。你可以参考一下。
      

  6.   

    多谢csz_1987,皮筋线跟皮筋矩形都已近搞定了,就是皮筋圆有问题.
      

  7.   

    我的实现是参照http://blog.csdn.net/wzuomin/archive/2006/12/13/1441007.aspx 中的第一个例子做的,所以皮筋圆部分也尽量用.Net自身的功能来实现,尽量不要去引用gdi32.dll
      

  8.   

    再次表达一下对 dylike 的感谢.